mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-25 09:40:28 -04:00
Rename the EventFormatVersions
enum values so that they line up with room version numbers. (#13706)
This commit is contained in:
parent
bb5b47b62a
commit
c2fe48a6ff
13 changed files with 47 additions and 41 deletions
|
@ -821,7 +821,7 @@ def _alias_event(room_version: RoomVersion, sender: str, **kwargs) -> EventBase:
|
|||
def _build_auth_dict_for_room_version(
|
||||
room_version: RoomVersion, auth_events: Iterable[EventBase]
|
||||
) -> List:
|
||||
if room_version.event_format == EventFormatVersions.V1:
|
||||
if room_version.event_format == EventFormatVersions.ROOM_V1_V2:
|
||||
return [(e.event_id, "not_used") for e in auth_events]
|
||||
else:
|
||||
return [e.event_id for e in auth_events]
|
||||
|
@ -871,7 +871,7 @@ event_count = 0
|
|||
|
||||
def _maybe_get_event_id_dict_for_room_version(room_version: RoomVersion) -> dict:
|
||||
"""If this room version needs it, generate an event id"""
|
||||
if room_version.event_format != EventFormatVersions.V1:
|
||||
if room_version.event_format != EventFormatVersions.ROOM_V1_V2:
|
||||
return {}
|
||||
|
||||
global event_count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue