Merge pull request #3960 from matrix-org/rav/fix_missing_create_event_error

Fix error handling for missing auth_event
This commit is contained in:
Richard van der Hoff 2018-10-02 13:57:54 +01:00 committed by GitHub
commit 2b8d28b095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/3960.bugfix Normal file
View File

@ -0,0 +1 @@
Fix error message for events with m.room.create missing from auth_events

View File

@ -98,9 +98,9 @@ def check(event, auth_events, do_sig_check=True, do_size_check=True):
creation_event = auth_events.get((EventTypes.Create, ""), None) creation_event = auth_events.get((EventTypes.Create, ""), None)
if not creation_event: if not creation_event:
raise SynapseError( raise AuthError(
403, 403,
"Room %r does not exist" % (event.room_id,) "No create event in auth events",
) )
creating_domain = get_domain_from_id(event.room_id) creating_domain = get_domain_from_id(event.room_id)