summary refs log tree commit diff
path: root/synapse/events/builder.py
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-09-07 10:08:20 +0000
committerGitHub <noreply@github.com>2022-09-07 11:08:20 +0100
commitc2fe48a6ffb99f553f3eaecb8f15bcbedb58add0 (patch)
treee9c6f09d739b503c9a15161e3502944b0c022c84 /synapse/events/builder.py
parentAdd Admin API to Fetch Messages Within a Particular Window (#13672) (diff)
downloadsynapse-c2fe48a6ffb99f553f3eaecb8f15bcbedb58add0.tar.xz
Rename the `EventFormatVersions` enum values so that they line up with room version numbers. (#13706)
Diffstat (limited to 'synapse/events/builder.py')
-rw-r--r--synapse/events/builder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 17f624b68f..746bd3978d 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -137,7 +137,7 @@ class EventBuilder:
         # The types of auth/prev events changes between event versions.
         prev_events: Union[List[str], List[Tuple[str, Dict[str, str]]]]
         auth_events: Union[List[str], List[Tuple[str, Dict[str, str]]]]
-        if format_version == EventFormatVersions.V1:
+        if format_version == EventFormatVersions.ROOM_V1_V2:
             auth_events = await self._store.add_event_hashes(auth_event_ids)
             prev_events = await self._store.add_event_hashes(prev_event_ids)
         else:
@@ -253,7 +253,7 @@ def create_local_event_from_event_dict(
 
     time_now = int(clock.time_msec())
 
-    if format_version == EventFormatVersions.V1:
+    if format_version == EventFormatVersions.ROOM_V1_V2:
         event_dict["event_id"] = _create_event_id(clock, hostname)
 
     event_dict["origin"] = hostname