|
|
@ -233,6 +233,11 @@ class FederationHandler(BaseHandler): |
|
|
|
|
|
|
|
|
|
|
|
if event.type == EventTypes.Member: |
|
|
|
if event.type == EventTypes.Member: |
|
|
|
if event.membership == Membership.JOIN: |
|
|
|
if event.membership == Membership.JOIN: |
|
|
|
|
|
|
|
context = yield self.state_handler.compute_event_context( |
|
|
|
|
|
|
|
event, old_state=state, outlier=event.internal_metadata.is_outlier() |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
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.state_key) |
|
|
|
user = UserID.from_string(event.state_key) |
|
|
|
yield self.distributor.fire( |
|
|
|
yield self.distributor.fire( |
|
|
|
"user_joined_room", user=user, room_id=event.room_id |
|
|
|
"user_joined_room", user=user, room_id=event.room_id |
|
|
|