Skip to content

Commit 4314f2b

Browse files
committed
Annotations: further tweaks
1 parent 2cb56fb commit 4314f2b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pages/docs/messages/annotations.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ When clients publish or delete an annotation, Ably automatically creates a [summ
2121
Annotations can be enabled for a channel or channel namespace with the *Message annotations, updates, and deletes* channel rule.
2222

2323
<Aside data-type='important'>
24-
Note that when message annotations are enabled, messages are [persisted](/docs/storage-history/storage#all-message-persistence) by default, and [continuous history](/docs/storage-history/history#continuous-history) features are not currently supported.
24+
Note that when message annotations are enabled, messages are [persisted](/docs/storage-history/storage#all-message-persistence) (whether or not persistence is enabled) in order to support the feature, which may increase your package quota usage. [Continuous history](/docs/storage-history/history#continuous-history) features are not yet supported (if you are currently using continuous history, be aware that for the moment, enabling annotations, updates, and deletes will break that feature!).
2525
</Aside>
2626

2727
1. Go to the [**Settings**](https://ably.com/accounts/any/apps/any/edit) tab of an app in your dashboard.
@@ -166,9 +166,9 @@ Deleting an annotation removes all contributions made by that `clientId` for tha
166166

167167
## Publish annotations <a id="publish" />
168168

169-
To publish an annotation for a message, use the `annotations.publish()` method on a channel. Pass in either a [message](/docs/messages) instance or the `serial` of the message to annotate. This method will publish an annotation message with an action of `annotation.create`.
169+
To publish an annotation for a message, use the `annotations.publish()` method on a channel. Pass in either a [message](/docs/messages) instance or the `serial` of the message to annotate. This method will publish an annotation with the action `annotation.create`.
170170

171-
The `clientId` specified in the [client options](/docs/api/realtime-sdk#client-options) will be associated with the published annotation. Note that certain annotation types require the client to be identified with a `clientId` in order to publish annotations.
171+
Certain annotation summarization methods require a client to be [identified](/docs/auth/identified-clients) for them to be able to publish an annotation. Their `clientId` will then be included in the associated published annotation.
172172

173173
Specify the [annotation type](#annotation-types) using the `type` field of the annotation object.
174174

@@ -292,7 +292,7 @@ The recommended way to receive annotation updates is through annotation summarie
292292

293293
Annotation summaries are delivered to subscribers as messages with an `action` of `message.summary`, and a `serial` matching the `serial` of the message that they are updating. They have an `annotations` field which contains a `summary` of all the annotations for the message.
294294

295-
The value of the `summary` field is an object where the keys are the [annotation types](#annotation-types). The structure of the value of each key depends on the summarization method used, for example `total.v1` will have a `total` field, while `flag.v1` will have `total` and `clientIds` fields.
295+
The value of that `summary` field is an object where the keys are the [annotation types](#annotation-types). The structure of the value of each key depends on the summarization method used, for example `total.v1` will have a `total` field, while `flag.v1` will have `total` and `clientIds` fields.
296296

297297
<Aside data-type='note'>
298298
Subscribing to annotations uses the same method as [subscribing to regular messages](/docs/pub-sub#subscribe) on a channel. When using message annotations, regular messages delivered to the `subscribe()` listener will have an `action` of `message.create`.
@@ -396,9 +396,9 @@ The summary will be included in the message's `summary` field, which is an objec
396396

397397
It is also possible to subscribe to individual annotation events, rather than annotation summaries. These are the emitted when [publishing](#publish) or [deleting](#delete) an annotation.
398398

399-
Individual events can be useful for activity feeds or detailed logging, however annotation summaries are generally more reliable and efficient for maintaining UI state.
399+
Individual events can be useful for activity feeds or detailed logging, but generally, for most usecases, subscribed clients should relying on aggregated summaries. The aggregation of annotations for a message into a summary attached to the message is the primary benefit of using the annotations API; an app design oriented around every client needing to subscribe to raw annotation events may not be taking full advantage of the feature.
400400

401-
Subscribe to individual annotation events using the `annotations.subscribe()` method on a channel. To subscribe to individual annotations, you must request the `ANNOTATION_SUBSCRIBE` [mode](/docs/channels/options#modes).
401+
But if you need to, you can subscribe to individual annotation events using the `annotations.subscribe()` method on a channel. To subscribe to individual annotations, you must request the `ANNOTATION_SUBSCRIBE` [mode](/docs/channels/options#modes).
402402

403403
<Aside data-type='note'>
404404
When you provide an explicit `modes` property for a channel, you override the set of [default modes](/docs/channels/options#modes). It is likely that you will be using features other than just annotations on the channel, so ensure that you also include the other `modes` that you require.

0 commit comments

Comments
 (0)