|
|
|
@ -2,9 +2,8 @@ Receipts
|
|
|
|
|
========
|
|
|
|
|
|
|
|
|
|
Receipts are used to publish which events in a room the user or their devices
|
|
|
|
|
have interacted with. For example, which events the user has read.
|
|
|
|
|
|
|
|
|
|
For efficiency this is done as "up to" markers, i.e. marking a particular event
|
|
|
|
|
have interacted with. For example, which events the user has read. For
|
|
|
|
|
efficiency this is done as "up to" markers, i.e. marking a particular event
|
|
|
|
|
as, say, ``read`` indicates the user has read all events *up to* that event.
|
|
|
|
|
|
|
|
|
|
Client-Server API
|
|
|
|
@ -43,14 +42,11 @@ For example::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
For efficiency, receipts are batched into one event per room. In the initialSync
|
|
|
|
|
and v2 sync APIs the receipts are listed in a seperate top level ``receipts``
|
|
|
|
|
key.
|
|
|
|
|
|
|
|
|
|
Each ``user_id``, ``receipt_type`` pair must be associated with only a single
|
|
|
|
|
``event_id``.
|
|
|
|
|
|
|
|
|
|
New receipts that come down the event streams are deltas. Deltas update
|
|
|
|
|
existing mappings, clobbering based on ``user_id``, ``receipt_type`` pairs.
|
|
|
|
|
and v2 sync APIs the receipts are listed in a separate top level ``receipts``
|
|
|
|
|
key. Each ``user_id``, ``receipt_type`` pair must be associated with only a
|
|
|
|
|
single ``event_id``. New receipts that come down the event streams are deltas.
|
|
|
|
|
Deltas update existing mappings, clobbering based on ``user_id``,
|
|
|
|
|
``receipt_type`` pairs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A client can update the markers for its user by issuing a request::
|
|
|
|
|