mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 23:42:33 +01:00
Don't KeyError if no power_levels event
This commit is contained in:
parent
0f1eb3e914
commit
ab1bc9bf5f
1 changed files with 3 additions and 1 deletions
|
@ -131,7 +131,9 @@ class BulkPushRuleEvaluator(object):
|
|||
|
||||
sender_level = get_user_power_level(event.sender, auth_events)
|
||||
|
||||
defer.returnValue((auth_events[POWER_KEY].content, sender_level))
|
||||
pl_event = auth_events.get(POWER_KEY)
|
||||
|
||||
defer.returnValue((pl_event.content if pl_event else {}, sender_level))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def action_for_event_by_user(self, event, context):
|
||||
|
|
Loading…
Reference in a new issue