Skip to content

Commit

Permalink
update documentation with respect to public and private in {meta} mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
or-else committed May 3, 2020
1 parent ded661a commit ad81890
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ ctrl: {

#### `{meta}`

Information about topic metadata or subscribers, sent in response to `{set}` or `{sub}` message to the originating session.
Information about topic metadata or subscribers, sent in response to `{get}`, `{set}` or `{sub}` message to the originating session.

```js
meta: {
Expand Down Expand Up @@ -1167,12 +1167,13 @@ meta: {
mode: "JRWP" // string, combination of want and given
},
read: 112, // integer, ID of the message user claims through {note} message
// to have read, optional
recv: 315, // integer, like 'read', but received, optional
// to have read, optional.
recv: 315, // integer, like 'read', but received, optional.
clear: 12, // integer, in case some messages were deleted, the greatest ID
// of a deleted message, optional
private: { ... } // application-defined user's 'private' object, present only
// for the requester's own subscriptions.
// of a deleted message, optional.
public: { ... }, // application-defined user's 'public' object, absent when
// querying P2P topics.
private: { ... } // application-defined user's 'private' object.
online: true, // boolean, current online status of the user; if this is a
// group or a p2p topic, it's user's online status in the topic,
// i.e. if the user is attached and listening to messages; if this
Expand All @@ -1187,11 +1188,8 @@ meta: {
topic: "grp1XUtEhjv6HND", // string, topic this subscription describes
seq: 321, // integer, server-issued id of the last {data} message

// The following fields are present only when querying 'me' topic and the
// The following field is present only when querying 'me' topic and the
// topic described is a P2P topic

public: { ... }, // application-defined user's 'public' object, present for
// P2P topics only
seen: { // object, if this is a P2P topic, info on when the peer was last
//online
when: "2015-10-24T10:26:09.716Z", // timestamp
Expand Down

0 comments on commit ad81890

Please sign in to comment.