diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-05-16 16:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 15:35:31 +0000 |
commit | 83be72d76ca171ceb0fc381aa4548c1d9fea0dc7 (patch) | |
tree | c7d4fee54f2b7ba7993c15b6d892d9579da3d91b /synapse/handlers/room.py | |
parent | Avoid unnecessary copies when filtering private read receipts. (#12711) (diff) | |
download | synapse-83be72d76ca171ceb0fc381aa4548c1d9fea0dc7.tar.xz |
Add `StreamKeyType` class and replace string literals with constants (#12567)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 23baa50d03..a2973109ad 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -73,6 +73,7 @@ from synapse.types import ( RoomID, RoomStreamToken, StateMap, + StreamKeyType, StreamToken, UserID, create_requester, @@ -1292,10 +1293,10 @@ class RoomContextHandler: events_after=events_after, state=await filter_evts(state_events), aggregations=aggregations, - start=await token.copy_and_replace("room_key", results.start).to_string( - self.store - ), - end=await token.copy_and_replace("room_key", results.end).to_string( + start=await token.copy_and_replace( + StreamKeyType.ROOM, results.start + ).to_string(self.store), + end=await token.copy_and_replace(StreamKeyType.ROOM, results.end).to_string( self.store ), ) |