mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-22 17:28:38 +01:00
Fix some mistakes/typos
This commit is contained in:
parent
0dc22e7217
commit
83dfc2bf61
|
|
@ -5,7 +5,7 @@ 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.
|
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
|
For efficiency this is done as "up to" markers, i.e. marking a particular event
|
||||||
as, e.g., read indicates the user has read all events *up to* that event.
|
as, say, ``read`` indicates the user has read all events *up to* that event.
|
||||||
|
|
||||||
Client-Server API
|
Client-Server API
|
||||||
-----------------
|
-----------------
|
||||||
|
|
@ -14,7 +14,23 @@ Clients will receive receipts in the following format::
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "m.receipt",
|
"type": "m.receipt",
|
||||||
"room_id": "!KpjVgQyZpzBwvMBsnT:matrix.org"
|
"room_id": <room_id>,
|
||||||
|
"content": {
|
||||||
|
<event_id>: {
|
||||||
|
<receipt_type>: {
|
||||||
|
<user_id>: { "ts": <ts>, ... },
|
||||||
|
...
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
For example::
|
||||||
|
|
||||||
|
{
|
||||||
|
"type": "m.receipt",
|
||||||
|
"room_id": "!KpjVgQyZpzBwvMBsnT:matrix.org",
|
||||||
"content": {
|
"content": {
|
||||||
"$1435641916114394fHBLK:matrix.org": {
|
"$1435641916114394fHBLK:matrix.org": {
|
||||||
"read": {
|
"read": {
|
||||||
|
|
@ -27,7 +43,8 @@ Clients will receive receipts in the following format::
|
||||||
}
|
}
|
||||||
|
|
||||||
For efficiency, receipts are batched into one event per room. In the initialSync
|
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.
|
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
|
Each ``user_id``, ``receipt_type`` pair must be associated with only a single
|
||||||
``event_id``.
|
``event_id``.
|
||||||
|
|
@ -40,7 +57,7 @@ A client can update the markers for its user by issuing a request::
|
||||||
|
|
||||||
POST /_matrix/client/v2_alpha/rooms/<room_id>/receipt/read/<event_id>
|
POST /_matrix/client/v2_alpha/rooms/<room_id>/receipt/read/<event_id>
|
||||||
|
|
||||||
Where the contents will of the POST will be included in the content sent to
|
Where the contents of the ``POST`` will be included in the content sent to
|
||||||
other users. The server will automatically set the ``ts`` field.
|
other users. The server will automatically set the ``ts`` field.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,7 +72,7 @@ format of the EDUs are::
|
||||||
<receipt_type>: {
|
<receipt_type>: {
|
||||||
<user_id>: { <content> }
|
<user_id>: { <content> }
|
||||||
},
|
},
|
||||||
....
|
...
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue