diff options
author | Erik Johnston <erikj@element.io> | 2024-01-05 13:03:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 13:03:20 +0000 |
commit | 7469fa7585f9e520344d58947ea617fdfa6bfa62 (patch) | |
tree | 81e465ffbcdb1376eb4e3b8fe92405733d09f2d0 /synapse/events/__init__.py | |
parent | Implement cosign on docker image (#16774) (diff) | |
download | synapse-7469fa7585f9e520344d58947ea617fdfa6bfa62.tar.xz |
Simplify internal metadata class. (#16762)
We remove these fields as they're just duplicating data the event already stores, and (for reasons :shushing_face:) I'd like to simplify the class to only store simple types. I'm not entirely convinced that we shouldn't instead add helper methods to the event class to generate stream tokens, but I don't really think that's where they belong either
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r-- | synapse/events/__init__.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 80e17f0fb0..c52e726661 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -42,7 +42,7 @@ from unpaddedbase64 import encode_base64 from synapse.api.constants import RelationTypes from synapse.api.room_versions import EventFormatVersions, RoomVersion, RoomVersions -from synapse.types import JsonDict, RoomStreamToken, StrCollection +from synapse.types import JsonDict, StrCollection from synapse.util.caches import intern_dict from synapse.util.frozenutils import freeze from synapse.util.stringutils import strtobool @@ -211,13 +211,6 @@ class _EventInternalMetadata: device_id: DictProperty[str] = DictProperty("device_id") """The device ID of the user who sent this event, if any.""" - # XXX: These are set by StreamWorkerStore._set_before_and_after. - # I'm pretty sure that these are never persisted to the database, so shouldn't - # be here - before: DictProperty[RoomStreamToken] = DictProperty("before") - after: DictProperty[RoomStreamToken] = DictProperty("after") - order: DictProperty[Tuple[int, int]] = DictProperty("order") - def get_dict(self) -> JsonDict: return dict(self._dict) |