Skip to content
Open
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 src/pages/docs/chat/rooms/history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Message storage and history
meta_description: "Retrieve previously sent messages from history."
---

The history feature enables users to retrieve messages that have been previously sent in a room. Ably stores chat messages for 30 days by default. You can extend this up to 365 days by [contacting us](https://ably.com/support).
The history feature enables users to retrieve messages that have been previously sent in a room. [Message persistence](/docs/chat/rooms#persistence) is enabled by default for all chat rooms, with messages stored for 30 days. You can extend this retention period up to 365 days by [contacting us](https://ably.com/support).

## Retrieve previously sent messages <a id="history"/>

Expand Down
8 changes: 8 additions & 0 deletions src/pages/docs/chat/rooms/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ It is important to note that each room is backed by a single Ably Pub/Sub channe

The channel name is the same as the room name with an appended suffix of `::$chat` (e.g `some-room-id::$chat`). In most cases, you will not need to worry about this, as the Chat SDK handles the channel creation and management for you and capabilities can be configured at the room level.

### Message persistence <a id="persistence"/>

The `::$chat` suffix applied to chat room channels enables intrinsic default behaviors that differ from standard Pub/Sub channels. One of the most important behaviors is message persistence.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This para is probably too much detail for the docs, I think we can remove it and let the following two do the talking.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to add Unlike typical Pub/Sub channels. We should assume someone is coming into this with 0 knowledge of Pub/Sub.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chat room channels have persistence enabled by default with a retention period of 30 days. This ensures that messages are automatically stored and can be retrieved using the [history feature](/docs/chat/rooms/history).

The default 30-day retention period can be extended up to 365 days by [contacting us](https://ably.com/support). This automatic persistence is essential for supporting features such as [message updates](/docs/chat/rooms/messages#update), [message deletions](/docs/chat/rooms/messages#delete), and [message reactions](/docs/chat/rooms/message-reactions), all of which require access to previously sent messages.

## Use a room <a id="create"/>

Users send messages to a room and subscribe to the room in order to receive messages.
Expand Down
4 changes: 4 additions & 0 deletions src/pages/docs/chat/rooms/messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Send, update, delete, and receive messages in a chat room with any number of par

A user can also update or delete a message, all users that are subscribed to the room will be notified of the changes.

<Aside data-type='note'>
To support updates, deletions, and [reactions](/docs/chat/rooms/message-reactions), [message persistence](/docs/chat/rooms#persistence) is enabled by default for all chat rooms.
</Aside>

## Subscribe to messages <a id="subscribe"/>

<If lang="javascript,swift,kotlin">
Expand Down