Replace membership and visibility values with constants (#774)

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Alex Chen 2019-08-06 22:07:36 +08:00 committed by Andrew Morgan
parent d283676b9a
commit f8d2860765
21 changed files with 51 additions and 65 deletions

View file

@ -233,7 +233,7 @@ func joinedHostsFromEvents(evs []gomatrixserverlib.Event) ([]types.JoinedHost, e
if err != nil {
return nil, err
}
if membership != "join" {
if membership != gomatrixserverlib.Join {
continue
}
_, serverName, err := gomatrixserverlib.SplitID('@', *ev.StateKey())