diff options
-rw-r--r-- | synapse/replication/tcp/client.py | 4 | ||||
-rw-r--r-- | synapse/types.py | 20 |
2 files changed, 19 insertions, 5 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py index 2f59245058..bc784d5516 100644 --- a/synapse/replication/tcp/client.py +++ b/synapse/replication/tcp/client.py @@ -407,8 +407,8 @@ class FederationSenderHandler: receipt.room_id, receipt.receipt_type, receipt.user_id, - [receipt.event_id], - receipt.data, + event_ids=[receipt.event_id], + data=receipt.data, ) await self.federation_sender.send_read_receipt(receipt_info) diff --git a/synapse/types.py b/synapse/types.py index 0586d2cbb9..050e2f7c10 100644 --- a/synapse/types.py +++ b/synapse/types.py @@ -822,17 +822,31 @@ class ThirdPartyInstanceID: @attr.s(slots=True, frozen=True, auto_attribs=True) -class ReadReceipt: - """Information about a read-receipt""" +class Receipt: + """Information about a receipt""" room_id: str receipt_type: str user_id: str - event_ids: List[str] data: JsonDict @attr.s(slots=True, frozen=True, auto_attribs=True) +class ReadReceipt(Receipt): + """Information about a read-receipt""" + + event_ids: List[str] + + +@attr.s(slots=True, frozen=True, auto_attribs=True) +class RangedReadReceipt(Receipt): + """Information about a ranged read-receipt""" + + start_event_id: str + end_event_id: str + + +@attr.s(slots=True, frozen=True, auto_attribs=True) class DeviceListUpdates: """ An object containing a diff of information regarding other users' device lists, intended for |