-
Notifications
You must be signed in to change notification settings - Fork 45
Docs for realtime update/delete, new return type, adding append, and rest api changes for public preview release #3044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds support for data-type="public-preview" to the Aside component to support labelling with the new Public Preview release stage. SEE: PDR-086
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
GregHolmes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple small changes needed.
I've added a comment on the Append to a message section as it feels like it's a lot of text that mostly compares appendMessage with updateMessage. Would love to know what you think on that part?
| MESSAGE_UPDATE, // 1 | ||
| MESSAGE_DELETE, // 2 | ||
| META, // 3 | ||
| MESSAGE_SUMMARY // 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MESSAGE_SUMMARY // 4 | |
| MESSAGE_SUMMARY, // 4 |
| ARTMessageActionUpdate, | ||
| ARTMessageActionDelete, | ||
| ARTMessageActionMeta, | ||
| ARTMessageActionMessageSummary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ARTMessageActionMessageSummary | |
| ARTMessageActionMessageSummary, |
| A successful request returns the updated @Message@ object with the new version information. | ||
|
|
||
| See [MessageAction](/docs/api/realtime-sdk/types#message-action) for the possible values of the `action` enum. | ||
| Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result), an object with a single `versionSerial` field: the serial of the version of the updated, deleted, or appended message, or `null` if the message was superseded by a subsequent update before it could be published. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result), an object with a single `versionSerial` field: the serial of the version of the updated, deleted, or appended message, or `null` if the message was superseded by a subsequent update before it could be published. | |
| Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object with a single `versionSerial` field: the serial of the version of the updated, deleted, or appended message, or `null` if the message was superseded by a subsequent update before it could be published. |
| Unlike `updateMessage()` which replaces the data field, `appendMessage()` concatenates the new data to the existing message's (string or binary) data. This is useful for building up message content incrementally, for example in streaming or gradual message building scenarios. Other fields (`name`, `extras`) will replace the previous values if provided, similar to update mixin semantics. | ||
|
|
||
| The message is identified by its `serial`, which is populated by Ably. To append to a message, you need its serial - you can get this either from the return value of `publish()`, from a received message via subscription, or by querying history. | ||
|
|
||
| When Ably receives an append, we will concatenate the provided data with the current latest version and calculate the updated full (non-incremental) version of the message. That full version of the message is what will be stored in [History](/docs/storage-history/history) as the most recent version, with an action of `message.update`, so someone paging through the history of a channel will never need to do any concatenation themselves, they will just get the full message. Similarly, when attaching to a channel using [rewind](/docs/channels/options/rewind) to get recent messages you will receive only one version of each message, the latest version with the full concatenated data, which means you can specify e.g. `rewind=10` to get the most recent 10 full, distinct messages. Only realtime subscribers receiving live messages will receive the incremental appends (and they can pass a [channel param](/docs/channels/options#append-mode) to request full versions if they want). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could most of this be summarised into a comparison table? It feels like we're comparing the two in these 3 paragraphs creating 4 chunks of text that may be unnecessary?
NB: not for merging until we do a prod rollout of the serverside components of this change