mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Style changes.
This commit is contained in:
parent
73dd81ca62
commit
76d7fd39cd
@ -37,6 +37,9 @@ def _get_state_key_from_event(event):
|
|||||||
KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key"))
|
KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key"))
|
||||||
|
|
||||||
|
|
||||||
|
AuthEventTypes = (EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,)
|
||||||
|
|
||||||
|
|
||||||
class StateHandler(object):
|
class StateHandler(object):
|
||||||
""" Responsible for doing state conflict resolution.
|
""" Responsible for doing state conflict resolution.
|
||||||
"""
|
"""
|
||||||
@ -215,7 +218,7 @@ class StateHandler(object):
|
|||||||
|
|
||||||
auth_events = {
|
auth_events = {
|
||||||
k: e for k, e in unconflicted_state.items()
|
k: e for k, e in unconflicted_state.items()
|
||||||
if k[0] in (EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,)
|
if k[0] in AuthEventTypes
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -240,10 +243,6 @@ class StateHandler(object):
|
|||||||
1. power levels
|
1. power levels
|
||||||
2. memberships
|
2. memberships
|
||||||
3. other events.
|
3. other events.
|
||||||
|
|
||||||
:param conflicted_state:
|
|
||||||
:param auth_events:
|
|
||||||
:return:
|
|
||||||
"""
|
"""
|
||||||
resolved_state = {}
|
resolved_state = {}
|
||||||
power_key = (EventTypes.PowerLevels, "")
|
power_key = (EventTypes.PowerLevels, "")
|
||||||
|
Loading…
Reference in New Issue
Block a user