diff options
author | Erik Johnston <erikj@matrix.org> | 2023-10-04 18:28:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 16:28:40 +0100 |
commit | 80ec81dcc54bdb823b95c2f870a919868de9a481 (patch) | |
tree | 4890f3c4fc0b95fd8b91e2d1f7b30b8e228e7b36 /synapse/storage | |
parent | Update changelog (diff) | |
download | synapse-80ec81dcc54bdb823b95c2f870a919868de9a481.tar.xz |
Some refactors around receipts stream (#16426)
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/databases/main/e2e_room_keys.py | 2 | ||||
-rw-r--r-- | synapse/storage/databases/main/receipts.py | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/e2e_room_keys.py b/synapse/storage/databases/main/e2e_room_keys.py index d01f28cc80..bc7c6a6346 100644 --- a/synapse/storage/databases/main/e2e_room_keys.py +++ b/synapse/storage/databases/main/e2e_room_keys.py @@ -208,7 +208,7 @@ class EndToEndRoomKeyStore(EndToEndRoomKeyBackgroundStore): "message": "Set room key", "room_id": room_id, "session_id": session_id, - StreamKeyType.ROOM: room_key, + StreamKeyType.ROOM.value: room_key, } ) diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index 0231f9407b..3bab1024ea 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -742,7 +742,7 @@ class ReceiptsWorkerStore(SQLBaseStore): event_ids: List[str], thread_id: Optional[str], data: dict, - ) -> Optional[Tuple[int, int]]: + ) -> Optional[int]: """Insert a receipt, either from local client or remote server. Automatically does conversion between linearized and graph @@ -804,9 +804,7 @@ class ReceiptsWorkerStore(SQLBaseStore): data, ) - max_persisted_id = self._receipts_id_gen.get_current_token() - - return stream_id, max_persisted_id + return stream_id async def _insert_graph_receipt( self, |