mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Only fire user_joined_room on the distributor if the user has actually joined the room
This commit is contained in:
parent
f593a6e5f8
commit
3d3da2b460
@ -517,10 +517,12 @@ class RoomMemberHandler(BaseHandler):
|
||||
do_auth=do_auth,
|
||||
)
|
||||
|
||||
user = UserID.from_string(event.user_id)
|
||||
yield self.distributor.fire(
|
||||
"user_joined_room", user=user, room_id=room_id
|
||||
)
|
||||
prev_state = context.current_state.get((event.type, event.state_key))
|
||||
if not prev_state or prev_state.membership != Membership.JOIN:
|
||||
user = UserID.from_string(event.user_id)
|
||||
yield self.distributor.fire(
|
||||
"user_joined_room", user=user, room_id=room_id
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_inviter(self, event):
|
||||
|
Loading…
Reference in New Issue
Block a user