diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-29 22:33:43 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-29 22:33:43 +0000 |
commit | 655ce037fd30589a587c8d3e5994e818a7ef381b (patch) | |
tree | 54bee847a27ec0a0961eb26358de7c854dfa5439 /synapse | |
parent | Newsfile (diff) | |
download | synapse-655ce037fd30589a587c8d3e5994e818a7ef381b.tar.xz |
check event format version not room version
Diffstat (limited to '')
-rw-r--r-- | synapse/event_auth.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py index 9199a6055f..e8da5310ed 100644 --- a/synapse/event_auth.py +++ b/synapse/event_auth.py @@ -22,10 +22,10 @@ from unpaddedbase64 import decode_base64 from synapse.api.constants import ( KNOWN_ROOM_VERSIONS, + EventFormatVersions, EventTypes, JoinRules, Membership, - RoomVersions, ) from synapse.api.errors import AuthError, EventSizeError, SynapseError from synapse.types import UserID, get_domain_from_id @@ -71,7 +71,7 @@ def check(room_version, event, auth_events, do_sig_check=True, do_size_check=Tru if not is_invite_via_3pid: raise AuthError(403, "Event not signed by sender's server") - if event.format_version in (RoomVersions.V1, RoomVersions.V2): + if event.format_version in (EventFormatVersions.V1,): # Only older room versions have event IDs to check. event_id_domain = get_domain_from_id(event.event_id) |