You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -34,12 +34,9 @@ If you are using a language that has an Ably Pub/Sub SDK, you can use the `fromE
34
34
35
35
If you are not using a language supported by an Ably Pub/Sub SDK, you will need to manually decode the message.
36
36
37
-
### Things to be aware of
37
+
Be aware that message actions are numeric values over the realtime channels, Pub/Sub REST API, and in integrations. Ably SDKs convert these numeric values to the corresponding string representations. If you do not use an Ably SDK, you will need to convert the numerical action values to their string representations.
38
38
39
-
- Chat Messages have an `action` that is one of: `message.created` (numeric value `0`), `message.updated` (numeric value `1`), or `message.deleted` (numeric value `2`).The Chat SDK treats annotation summaries as a separate concept at the moment, but in Pub/Sub they are a complete message with the `action` set to `message.summary` (numeric value `4`).
40
-
-[Message actions](https://sdk.ably.com/builds/ably/specification/main/features/#TM5) are numeric values over the realtime channels, Pub/Sub REST API, and in integrations. Ably SDKs convert these numeric values to the corresponding string representations. If you do not use an Ably SDK, you will need to convert the numerical action values to their string representations.
41
-
- If possible, use an Ably Pub/Sub SDK with `fromEncoded()` or `fromEncodedArray()` to decode the message. This will ensure that the message is decoded correctly and all the fields are present, as well as convert things like numerical action values to their string representations. Details on how to do this are available in the [platform integrations documentation](/docs/platform/integrations/webhooks).
42
-
- Message reaction summaries are always sent with the message, so you can use the `annotations.summary` field to get the reaction summaries, even if the action is not `message.summary`.
39
+
If possible, use an Ably Pub/Sub SDK with `fromEncoded()` or `fromEncodedArray()` to decode the message. This will ensure that the message is decoded correctly and all the fields are present, as well as convert things like numerical action values to their string representations. Details on how to do this are available in the [platform integrations documentation](/docs/platform/integrations/webhooks).
43
40
44
41
### Is this message new, updated, or deleted?
45
42
@@ -65,4 +62,4 @@ Message reactions are a Chat feature based on the Pub/Sub [annotations](/docs/me
65
62
66
63
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.
67
64
68
-
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.
65
+
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`.
0 commit comments