From 83dfc2bf61ef776ad32f7a897c82a67f95e0caa3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 28 Aug 2015 15:01:02 +0100 Subject: [PATCH] Fix some mistakes/typos --- specification/46_receipts.rst | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/specification/46_receipts.rst b/specification/46_receipts.rst index 43b849478..6428d6b5c 100644 --- a/specification/46_receipts.rst +++ b/specification/46_receipts.rst @@ -5,16 +5,32 @@ 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 -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 ----------------- Clients will receive receipts in the following format:: + { + "type": "m.receipt", + "room_id": , + "content": { + : { + : { + : { "ts": , ... }, + ... + } + }, + ... + } + } + +For example:: + { "type": "m.receipt", - "room_id": "!KpjVgQyZpzBwvMBsnT:matrix.org" + "room_id": "!KpjVgQyZpzBwvMBsnT:matrix.org", "content": { "$1435641916114394fHBLK:matrix.org": { "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 -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 ``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//receipt/read/ -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. @@ -55,7 +72,7 @@ format of the EDUs are:: : { : { } }, - .... + ... }, ... }