mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Replace membership and visibility values with constants (#774)
Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
parent
d283676b9a
commit
f8d2860765
21 changed files with 51 additions and 65 deletions
|
@ -93,16 +93,16 @@ func (n *Notifier) OnNewEvent(
|
|||
} else {
|
||||
// Keep the joined user map up-to-date
|
||||
switch membership {
|
||||
case "invite":
|
||||
case gomatrixserverlib.Invite:
|
||||
usersToNotify = append(usersToNotify, targetUserID)
|
||||
case "join":
|
||||
case gomatrixserverlib.Join:
|
||||
// Manually append the new user's ID so they get notified
|
||||
// along all members in the room
|
||||
usersToNotify = append(usersToNotify, targetUserID)
|
||||
n.addJoinedUser(ev.RoomID(), targetUserID)
|
||||
case "leave":
|
||||
case gomatrixserverlib.Leave:
|
||||
fallthrough
|
||||
case "ban":
|
||||
case gomatrixserverlib.Ban:
|
||||
n.removeJoinedUser(ev.RoomID(), targetUserID)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue