Cleanup event auth type initialisation (#5975)

Very small code cleanup.
pull/5982/head
Andrew Morgan 2019-09-04 16:16:56 +01:00 committed by GitHub
parent 6e834e94fc
commit b09d443632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

1
changelog.d/5975.misc Normal file
View File

@ -0,0 +1 @@
Cleanup event auth type initialisation.

View File

@ -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"]