summary refs log tree commit diff
path: root/synapse/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-01-24 18:32:30 +0000
committerGitHub <noreply@github.com>2019-01-24 18:32:30 +0000
commit664b7a2920ee481359e0cf3df35a16ec0948526e (patch)
tree8d3d6e7357ce5382fc9d0611ff97b6060a495ccc /synapse/events/__init__.py
parentMerge pull request #4461 from matrix-org/anoa/room_dir_quick_fix (diff)
parentUpdate newsfile (diff)
downloadsynapse-664b7a2920ee481359e0cf3df35a16ec0948526e.tar.xz
Merge pull request #4437 from matrix-org/erikj/event_format_version_v2
Add support for persisting event format versions
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r--synapse/events/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 84c75495d5..9dd6940385 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -18,6 +18,7 @@ from distutils.util import strtobool
 
 import six
 
+from synapse.api.constants import EventFormatVersions
 from synapse.util.caches import intern_dict
 from synapse.util.frozenutils import freeze
 
@@ -179,6 +180,8 @@ class EventBase(object):
 
 
 class FrozenEvent(EventBase):
+    format_version = EventFormatVersions.V1  # All events of this type are V1
+
     def __init__(self, event_dict, internal_metadata_dict={}, rejected_reason=None):
         event_dict = dict(event_dict)