mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 00:50:10 +00:00
Fix state resolution to remember join_rules is a type of auth event.
This commit is contained in:
parent
c0462dbf15
commit
f275ba49bb
1 changed files with 13 additions and 1 deletions
|
@ -37,7 +37,10 @@ def _get_state_key_from_event(event):
|
|||
KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key"))
|
||||
|
||||
|
||||
AuthEventTypes = (EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,)
|
||||
AuthEventTypes = (
|
||||
EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,
|
||||
EventTypes.JoinRules,
|
||||
)
|
||||
|
||||
|
||||
class StateHandler(object):
|
||||
|
@ -258,6 +261,15 @@ class StateHandler(object):
|
|||
|
||||
auth_events.update(resolved_state)
|
||||
|
||||
for key, events in conflicted_state.items():
|
||||
if key[0] == EventTypes.JoinRules:
|
||||
resolved_state[key] = self._resolve_auth_events(
|
||||
events,
|
||||
auth_events
|
||||
)
|
||||
|
||||
auth_events.update(resolved_state)
|
||||
|
||||
for key, events in conflicted_state.items():
|
||||
if key[0] == EventTypes.Member:
|
||||
resolved_state[key] = self._resolve_auth_events(
|
||||
|
|
Loading…
Reference in a new issue