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
Very small code cleanup.
  • Loading branch information
anoadragon453 authored Sep 4, 2019
1 parent 6e834e9 commit b09d443
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 b09d443

Please sign in to comment.