summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-09-04 16:16:56 +0100
committerGitHub <noreply@github.com>2019-09-04 16:16:56 +0100
commitb09d443632d699954677b4b56d4249826a3f6524 (patch)
treeea131c87b2037bc1aa47bed7ae84f242e7c47434
parentFix and refactor room and user stats (#5971) (diff)
downloadsynapse-b09d443632d699954677b4b56d4249826a3f6524.tar.xz
Cleanup event auth type initialisation (#5975)
Very small code cleanup.
-rw-r--r--changelog.d/5975.misc1
-rw-r--r--synapse/event_auth.py10
2 files changed, 6 insertions, 5 deletions
diff --git a/changelog.d/5975.misc b/changelog.d/5975.misc
new file mode 100644
index 0000000000..5fcd229b89
--- /dev/null
+++ b/changelog.d/5975.misc
@@ -0,0 +1 @@
+Cleanup event auth type initialisation.
\ No newline at end of file
diff --git a/synapse/event_auth.py b/synapse/event_auth.py
index cd52e3f867..4e91df60e6 100644
--- a/synapse/event_auth.py
+++ b/synapse/event_auth.py
@@ -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"]