Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Cleanup event auth type initialisation (#5975)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Feb 25, 2020
2 parents 91e030a + b09d443 commit 9262517
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/5975.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cleanup event auth type initialisation.
10 changes: 5 additions & 5 deletions synapse/event_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,11 @@ def auth_types_for_event(event):
if event.type == EventTypes.Create:
return []

auth_types = []

auth_types.append((EventTypes.PowerLevels, ""))
auth_types.append((EventTypes.Member, event.sender))
auth_types.append((EventTypes.Create, ""))
auth_types = [
(EventTypes.PowerLevels, ""),
(EventTypes.Member, event.sender),
(EventTypes.Create, ""),
]

if event.type == EventTypes.Member:
membership = event.content["membership"]
Expand Down

0 comments on commit 9262517

Please sign in to comment.