mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix membership changes to be idempotent
This commit is contained in:
parent
2aa39db681
commit
f2690c6423
@ -85,6 +85,12 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
prev_event_ids=prev_event_ids,
|
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(
|
yield msg_handler.handle_new_client_event(
|
||||||
requester,
|
requester,
|
||||||
event,
|
event,
|
||||||
|
Loading…
Reference in New Issue
Block a user