0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-30 08:28:19 +02:00

Merge pull request #1067 from matrix-org/markjh/idempotent

Fix membership changes to be idempotent
This commit is contained in:
Mark Haines 2016-09-05 10:21:25 +01:00 committed by GitHub
commit 274c2f50a5

View file

@ -85,6 +85,12 @@ class RoomMemberHandler(BaseHandler):
prev_event_ids=prev_event_ids,
)
# Check if this event matches the previous membership event for the user.
duplicate = yield msg_handler.deduplicate_state_event(event, context)
if duplicate is not None:
# Discard the new event since this membership change is a no-op.
return
yield msg_handler.handle_new_client_event(
requester,
event,