Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/partials/types/_message.textile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ blang[jsall].
h6(#serial).
default: serial

A server-assigned identifier that will be the same in all future updates of this message. It can be used to add "annotations":/docs/messages/annotations to a message or to "update or delete":/docs/messages/updates-deletes it. Serial will only be set if you enable annotations, updates, and deletes in "channel rules":/docs/channels#rules .<br>__Type: @String@__
A server-assigned identifier that will be the same in all future updates of this message. It can be used to add "annotations":/docs/messages/annotations to a message or to "update or delete":/docs/messages/updates-deletes it. Serial will only be set if you enable annotations, updates, deletes, and appends in "channel rules":/docs/channels#rules .<br>__Type: @String@__

h6(#annotations).
default: annotations
Expand Down
2 changes: 1 addition & 1 deletion examples/pub-sub-message-annotations/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This example demonstrates:
yarn install
```

6. Enable the "Annotations, updates and deletes" channel rule that matches the channel name you'll be using (by default we use a channel name of `annotation:pub-sub-message-annotations`, so if using this, [create this rule](https://ably.com/docs/channels#rules) for the "annotation" channel namespace).
6. Enable the "Annotations, updates, deletes, and appends" channel rule that matches the channel name you'll be using (by default we use a channel name of `annotation:pub-sub-message-annotations`, so if using this, [create this rule](https://ably.com/docs/channels#rules) for the "annotation" channel namespace).

7. Run the server:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const urlParams = new URLSearchParams(window.location.search);
export const clientId = urlParams.get('clientId') || 'user1';
// Remember to enable the "Annotations, updates, and deletes" channel rule for the channel
// Remember to enable the "Annotations, updates, deletes, and appends" channel rule for the channel
// namespace you're using (the first colon-delimited segment, here, "annotation")
export const channelName = `annotation:${import.meta.env.VITE_NAME ?? 'annotation:pub-sub-message-annotations'}`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ async function main() {
// Regular messages will be received as message.create events.
getChannel().subscribe((message) => {
if (!hasSerial(message)) {
console.error('Received message without serial (this indicates that you need to enable the "Annotations, updates, and deletes" feature in channel rules)');
console.error(
'Received message without serial (this indicates that you need to enable the "Annotations, updates, deletes, and appends" feature in channel rules)',
);
return;
}
if (message.action === 'message.summary') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Standard Ably message [size limits](/docs/platform/pricing/limits#message) apply

## Enable appends <a id="enable"/>

Message append functionality requires the "Message annotations, updates, and deletes" [channel rule](/docs/channels#rules) enabled for your channel or [namespace](/docs/channels#namespaces).
Message append functionality requires the "Message annotations, updates, deletes, and appends" [channel rule](/docs/channels#rules) enabled for your channel or [namespace](/docs/channels#namespaces).

<Aside data-type="important">
When the "Message updates and deletes" channel rule is enabled, messages are persisted regardless of whether or not persistence is enabled, in order to support the feature. This may increase your usage since [we charge for persisting messages](https://faqs.ably.com/how-does-ably-count-messages).
Expand All @@ -34,7 +34,7 @@ To enable the channel rule:
2. Navigate to the "Configuration" > "Rules" section from the left-hand navigation bar.
3. Choose "Add new rule".
4. Enter a channel name or namespace pattern (e.g. `ai:*` for all channels starting with `ai:`).
5. Select the "Message annotations, updates, and deletes" rule from the list.
5. Select the "Message annotations, updates, deletes, and appends" rule from the list.
6. Click "Create channel rule".

The examples on this page use the `ai:` namespace prefix, which assumes you have configured the rule for `ai:*`.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/realtime-sdk/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@ The action type of the message, one of the [`MessageAction`](/docs/api/realtime-

### serial <a id="serial" />

A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, and deletes in [channel rules](/docs/channels#rules).<br />_Type: `String`_
A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, deletes, and appends in [channel rules](/docs/channels#rules).<br />_Type: `String`_

### annotations <a id="annotations" />

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/realtime-sdk/messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The action type of the message, one of the [`MessageAction`](/docs/api/realtime-

### serial <a id="serial" />

A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, and deletes in [channel rules](/docs/channels#rules).<br />_Type: `String`_
A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, deletes, and appends in [channel rules](/docs/channels#rules).<br />_Type: `String`_

### annotations <a id="annotations" />

Expand Down
4 changes: 2 additions & 2 deletions src/pages/docs/api/rest-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ An unsuccessful request returns an error. A 404 error is returned if a message w

#### PATCH main.realtime.ably.net/channels/\<channelId\>/messages/\<serial\>

Update an existing message on a channel, the message with the specified serial. This endpoint requires that the channel is configured with the "Message annotations, updates, and deletes" channel rule.
Update an existing message on a channel, the message with the specified serial. This endpoint requires that the channel is configured with the "Message annotations, updates, deletes, and appends" channel rule.

See [Updating and deleting messages](/docs/messages/updates-deletes#update) for more information about message updates and field semantics.

Expand Down Expand Up @@ -770,7 +770,7 @@ An unsuccessful request returns an error.

#### POST main.realtime.ably.net/channels/\<channelId\>/messages/\<serial\>/delete

Delete a message on a channel, the message with the specified serial. This is a 'soft' delete that publishes a new version of the message with an action of `message.delete`. The full message history remains accessible through the [message versions](message-versions) endpoint. This endpoint requires that the channel is configured with the "Message annotations, updates, and deletes" channel rule.
Delete a message on a channel, the message with the specified serial. This is a 'soft' delete that publishes a new version of the message with an action of `message.delete`. The full message history remains accessible through the [message versions](message-versions) endpoint. This endpoint requires that the channel is configured with the "Message annotations, updates, deletes, and appends" channel rule.

See [Updating and deleting messages](/docs/messages/updates-deletes#update) for more information about message updates and field semantics.

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/rest-sdk/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ The action type of the message, one of the [`MessageAction`](/docs/api/realtime-

### serial <a id="serial" />

A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, and deletes in [channel rules](/docs/channels#rules).<br />_Type: `String`_
A server-assigned identifier that will be the same in all future updates of this message. It can be used to add [annotations](/docs/messages/annotations) to a message or to [update or delete](/docs/messages/updates-deletes) it. Serial will only be set if you enable annotations, updates, deletes, and appends in [channel rules](/docs/channels#rules).<br />_Type: `String`_

### annotations <a id="annotations" />

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/channels/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The channel rules related to enabling features are:
| Push notifications enabled | If checked, publishing messages with a push payload in the `extras` field is permitted. This triggers the delivery of a [Push Notification](/docs/push) to devices registered for push on the channel. |
| Server-side batching | If enabled, messages are grouped into batches before being sent to subscribers. [Server-side batching](/docs/messages/batch#server-side) reduces the overall message count, lowers costs, and mitigates the risk of hitting rate limits during high-throughput scenarios. |
| Message conflation | If enabled, messages are aggregated over a set period of time and evaluated against a conflation key. All but the latest message for each conflation key value will be discarded, and the resulting message, or messages, will be delivered to subscribers as a single batch once the period of time elapses. [Message conflation](/docs/messages#conflation) reduces costs in high-throughput scenarios by removing redundant and outdated messages. |
| Message annotations, updates, and deletes | If enabled, allows message "annotations":/docs/messages/annotations to be used, as well as updates and deletes to be published to messages. Note that these features are currently Experimental, still in development, and subject to change. When this feature is enabled, messages will be "persisted":/docs/storage-history/storage#all-message-persistence (necessary in order from them later be annotated or updated), and "continuous history":/docs/storage-history/history#continuous-history features will not work.
| Message annotations, updates, deletes, and appends | If enabled, allows message "annotations":/docs/messages/annotations to be used, as well as updates, deletes, and appends to be published to messages. Note that these features are currently Experimental, still in development, and subject to change. When this feature is enabled, messages will be "persisted":/docs/storage-history/storage#all-message-persistence (necessary in order from them later be annotated or updated), and "continuous history":/docs/storage-history/history#continuous-history features will not work.

To set a channel rule in the Ably dashboard:

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/chat/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ Message reactions are a Chat feature based on the Pub/Sub [annotations](/docs/me

Messages arriving from the realtime channel or integrations will show the annotation type under `message.annotations.summary`. The Chat SDKs automatically map the annotation type to the message reaction type and provide convenient `message.reactions.unique`, `message.reactions.distinct`, and `message.reactions.multiple` fields. When working with Pub/Sub integrations, you will need to either use the annotations directly or apply the mappping in your own code.

All messages on a chat channel (or any channel with the **Message annotations, updates, and deletes** rule enabled) contain a `message.annotations.summary` field if the summary isn't empty. This is true even if the action is not `message.summary`.
All messages on a chat channel (or any channel with the **Message annotations, updates, deletes, and appends** rule enabled) contain a `message.annotations.summary` field if the summary isn't empty. This is true even if the action is not `message.summary`.
6 changes: 3 additions & 3 deletions src/pages/docs/messages/annotations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ When clients publish or delete an annotation, Ably automatically creates a [summ

## Enable annotations <a id="enable"/>

Annotations can be enabled for a channel or channel namespace with the *Message annotations, updates, and deletes* channel rule.
Annotations can be enabled for a channel or channel namespace with the *Message annotations, updates, deletes, and appends* channel rule.

<Aside data-type='important'>
When message annotations are enabled, messages are [persisted](/docs/storage-history/storage#all-message-persistence) regardless of whether or not persistence is enabled, in order to support the feature. This may increase your usage since [we charge for persisting messages](https://faqs.ably.com/how-does-ably-count-messages).

[Continuous history](/docs/storage-history/history#continuous-history) features are not supported. Be aware that if you are currently using continuous history and enable annotations, updates, and deletes, continuous history will no longer function.
[Continuous history](/docs/storage-history/history#continuous-history) features are not supported. Be aware that if you are currently using continuous history and enable annotations, updates, deletes, and appends, continuous history will no longer function.
</Aside>

1. Go to the **Settings** tab of an app in your dashboard.
3. Under [channel rules](/docs/channels#rules), click **Add new rule**.
4. Enter the channel name or channel namespace on which to enable message annotations.
5. Check **Message annotations, updates, and deletes** to enable message annotations.
5. Check **Message annotations, updates, deletes, and appends** to enable message annotations.
6. Click **Create channel rule** to save.

## Annotation types <a id="annotation-types"/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/messages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following are the properties of a message:
| **extras** | A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads. Valid payloads include those related to [Push Notifications](/docs/push), [deltas](/docs/channels/options/deltas) and headers |
| **encoding** | This is typically empty, as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute contains the remaining transformations not applied to the data payload |
| **action** | An [enum](/docs/api/realtime-sdk/types#message-action) telling you whether this is a normal ('create') message, an update to a previous message, an annotation summary, etc. |
| **serial** | The message's serial (a server-assigned identifier that will be the same in all future updates of this message, and can be used to add [annotations](/docs/messages/annotations) or to [update or delete](/docs/messages/updates-deletes) the message). This will only be set if you enable annotations, updates, and deletes in [channel rules](/docs/channels#rules) |
| **serial** | The message's serial (a server-assigned identifier that will be the same in all future updates of this message, and can be used to add [annotations](/docs/messages/annotations) or to [update or delete](/docs/messages/updates-deletes) the message). This will only be set if you enable annotations, updates, deletes, and appends in [channel rules](/docs/channels#rules) |
| **annotations** | An object containing a summary of any [annotations](/docs/messages/annotations) that have been made to the message |
| **version** | An object containing [version metadata](/docs/messages/updates-deletes#version-structure) for messages that have been updated or deleted |

Expand Down
6 changes: 3 additions & 3 deletions src/pages/docs/messages/updates-deletes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ You can access the full version history of any given message.

## Enable message updates and deletes <a id="enable"/>

Message updates and deletes can be enabled for a channel or channel namespace with the *Message annotations, updates, and deletes* channel rule.
Message updates and deletes can be enabled for a channel or channel namespace with the *Message annotations, updates, deletes, and appends* channel rule.

<Aside data-type='important'>
When message updates and deletes are enabled, messages are [persisted](/docs/storage-history/storage#all-message-persistence) regardless of whether or not persistence is enabled, in order to support the feature. This may increase your usage since [we charge for persisting messages](https://faqs.ably.com/how-does-ably-count-messages).

[Continuous history](/docs/storage-history/history#continuous-history) features are not yet supported. Be aware that for now, if you are currently using continuous history and enable annotations, updates, and deletes, continuous history will no longer function.
[Continuous history](/docs/storage-history/history#continuous-history) features are not yet supported. Be aware that for now, if you are currently using continuous history and enable annotations, updates, deletes, and appends, continuous history will no longer function.
</Aside>

1. Go to the **Settings** tab of an app in your dashboard.
2. Under [channel rules](/docs/channels#rules), click **Add new rule**.
3. Enter the channel name or channel namespace on which to enable message updates and deletes.
4. Check **Message annotations, updates, and deletes** to enable the feature.
4. Check **Message annotations, updates, deletes, and appends** to enable the feature.
5. Click **Create channel rule** to save.

## Update a message <a id="update"/>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/docs/platform/errors/codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Resolution: The following steps can help resolve this issue:

This error occurs when the requested operation is only available in a newer version of the Ably protocol than the one specified in the request. This can happen if the client is using an older version of the Ably SDK that does not support the requested operation.

Examples of this error include attempting to use [channel objects](/docs/liveobjects) or message annotations, updates and deletes from an Ably SDK that does not support protocol version 2.
Examples of this error include attempting to use [channel objects](/docs/liveobjects) or message annotations, updates, deletes, and appends from an Ably SDK that does not support protocol version 2.

Resolution: The following steps can help resolve this issue:
* Upgrade the Ably SDK to a version that supports the requested operation.
Expand Down Expand Up @@ -773,12 +773,12 @@ This error occurs when attempting to [subscribe to individual annotations](/docs
**Resolution:**
* Ensure that `annotation_subscribe` mode is specified in the client [channel options](/docs/channels/options) before subscribing to individual annotations.

## 93002: Annotations are only supported on channels with message annotations, updates, and deletes enabled <a id="93002"/>
## 93002: Annotations are only supported on channels with message annotations, updates, deletes, and appends enabled <a id="93002"/>

This error occurs when attempting to use [message annotations](/docs/messages/annotations) on a channel that does not have them enabled.

**Resolution:**
* Create a [channel rule](/docs/channels#rules) for the channel or channel namespace with **Message annotations, updates, and deletes** enabled.
* Create a [channel rule](/docs/channels#rules) for the channel or channel namespace with **Message annotations, updates, deletes, and appends** enabled.

## 101000: Space name missing <a id="101000"/>

Expand Down