Skip to content

Commit bcdbad1

Browse files
committed
Update and add links for Chat API refs and add meta_descriptions
1 parent 04c3869 commit bcdbad1

File tree

14 files changed

+51
-51
lines changed

14 files changed

+51
-51
lines changed

src/pages/docs/chat/api/javascript/auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Authentication
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for authentication."
44
---
55

6-
The [ChatClient](/docs/chat/api/javascript/chat-client) requires a realtime client generated by the core [Pub/Sub SDK](LINK) to establish a connection with Ably. This realtime client is used to handle authentication with Ably.
6+
The [ChatClient](/docs/chat/api/javascript/chat-client) requires a realtime client generated by the core [Pub/Sub SDK](/docs/basics) to establish a connection with Ably. This realtime client is used to handle authentication with Ably.
77

88
There are broadly three mechanisms of authentication with Ably:
99

src/pages/docs/chat/api/javascript/chat-client.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ChatClient
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the ChatClient constructor."
44
---
55

66
The `ChatClient` class is the core client for Ably Chat.
@@ -33,7 +33,7 @@ Use the following parameters:
3333

3434
| Parameter | Description | Type |
3535
| --------- | ----------- | ---- |
36-
| `realtime` | The Ably Realtime client. | [`Realtime`](https://sdk.ably.com/builds/ably/ably-js/main/typedoc/) |
36+
| `realtime` | The Ably Realtime client. | [`Realtime`](#realtime) |
3737
| `clientOptions` | *Optional* The client options. | [`ChatClientOptions`](#chatclientoptions) |
3838

3939
#### ChatClientOptions
@@ -102,7 +102,7 @@ const chatClient = new ChatClient(realtimeClient, {
102102

103103
## Realtime
104104

105-
The Chat constructor requires a realtime client generated using the core [Pub/Sub SDK]() to establish a connection with Ably. The realtime client handles [authentication](/docs/chat/api/javascript/auth) with Ably.
105+
The Chat constructor requires a realtime client generated using the core [Pub/Sub SDK](/docs/basics) to establish a connection with Ably. The realtime client handles [authentication](/docs/chat/api/javascript/auth) with Ably.
106106

107107
`new Ably.Realtime(ClientOptions clientOptions)`
108108

src/pages/docs/chat/api/javascript/connection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Connection
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the Connection interface."
44
---
55

66
The `Connection` interface represents a connection to Ably.

src/pages/docs/chat/api/javascript/error-info.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ErrorInfo
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the ErrorInfo class."
44
---
55

66
The `ErrorInfo` class is a generic Ably error object that contains an Ably-specific status code, and a generic status code. Errors returned from the Ably server are compatible with the `ErrorInfo` structure and should result in errors that inherit from `ErrorInfo`.

src/pages/docs/chat/api/javascript/message.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Message
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the Message interface."
44
---
55

66
The `Message` interface represents a single message in a chat room.
@@ -114,7 +114,7 @@ Use the following parameters:
114114

115115
| Parameter | Description | Type |
116116
| --------- | ----------- | ---- |
117-
| `message` | The message to compare against. | [`Message`](#message) |
117+
| `message` | The message to compare against. | `Message` |
118118

119119
### Returns
120120

@@ -144,7 +144,7 @@ Use the following parameters:
144144

145145
| Parameter | Description | Type |
146146
| --------- | ----------- | ---- |
147-
| `message` | The message to compare against. | [`Message`](#message) |
147+
| `message` | The message to compare against. | `Message` |
148148

149149
### Returns
150150

@@ -176,7 +176,7 @@ Use the following parameters:
176176

177177
| Parameter | Description | Type |
178178
| --------- | ----------- | ---- |
179-
| `message` | The message to compare against. | [`Message`](#message) |
179+
| `message` | The message to compare against. | `Message` |
180180

181181
### Returns
182182

@@ -192,7 +192,7 @@ const isEqual = message1.equal(message2);
192192

193193
`message.isSameAs()`
194194

195-
Alias for [`message.equal()`](LINK).
195+
Alias for [`message.equal()`](#equal).
196196

197197
`isSameAs(message: Message): boolean`
198198

@@ -212,7 +212,7 @@ Use the following parameters:
212212

213213
| Parameter | Description | Type |
214214
| --------- | ----------- | ---- |
215-
| `message` | The message to compare against. | [`Message`](#message) |
215+
| `message` | The message to compare against. | `Message` |
216216

217217
### Returns
218218

@@ -240,7 +240,7 @@ Use the following parameters:
240240

241241
| Parameter | Description | Type |
242242
| --------- | ----------- | ---- |
243-
| `message` | The message to compare against. | [`Message`](#message) |
243+
| `message` | The message to compare against. | `Message` |
244244

245245
### Returns
246246

@@ -266,7 +266,7 @@ Use the following parameters:
266266

267267
| Parameter | Description | Type |
268268
| --------- | ----------- | ---- |
269-
| `message` | The message to compare against. | [`Message`](#message) |
269+
| `message` | The message to compare against. | `Message` |
270270

271271
### Returns
272272

@@ -330,7 +330,7 @@ Use the following parameters:
330330

331331
| Parameter | Description | Type |
332332
| --------- | ----------- | ---- |
333-
| `event` | The event to be applied to the returned message. | [`Message`](#message) \| [`ChatMessageEvent`](#chatmessageevent) \| [`MessageReactionSummaryEvent`](#messagereactionsummaryevent) |
333+
| `event` | The event to be applied to the returned message. | `Message` \| [`ChatMessageEvent`](#chatmessageevent) \| [`MessageReactionSummaryEvent`](#messagereactionsummaryevent) |
334334

335335
#### ChatMessageEvent
336336

@@ -341,7 +341,7 @@ It has the following properties:
341341
| Properties | Description | Type |
342342
| ---------- | ----------- | ---- |
343343
| `type` | The type of the message event. | [`ChatMessageEventType`](#chatmessageeventtype) |
344-
| `data` | The message data. | [`Message`](#message) |
344+
| `data` | The message data. | `Message` |
345345

346346
#### ChatMessageEventType
347347

src/pages/docs/chat/api/javascript/messages-reactions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: MessagesReactions
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the MessageReactions interface."
44
---
55

66
The `MessagesReactions` interface is used to add, delete, and subscribe to reactions on individual messages.

src/pages/docs/chat/api/javascript/messages.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Messages
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the Messages interface."
44
---
55

66
The `Messages` interface is used to send and subscribe to messages in a chat room.
@@ -47,13 +47,13 @@ The following `SendMessageParams` can be set:
4747
| `metadata` | *Optional* Metadata to attach to the message. Allows for attaching extra info to a message, which can be used for various features such as animations, effects, or simply to link it to other resources such as images, relative points in time, etc. This value is always set on received messages. If there is no metadata, this is an empty object. Do not use metadata for authoritative information. There is no server-side validation. When reading the metadata, treat it like user input. | [`MessageMetadata`](#messagemetadata) |
4848
| `headers` | *Optional* Headers to attach to the message. Headers enable attaching extra info to a message, which can be used for various features such as linking to a relative point in time of a livestream video or flagging this message as important or pinned. This value is always set on received messages. If there are no headers, this is an empty object. Do not use the headers for authoritative information. There is no server-side validation. When reading the headers, treat them like user input. | [`MessageHeaders`](#messageheaders) |
4949

50-
#### MessageMetadata <a id="messagemetadata"/>
50+
#### MessageMetadata
5151

5252
Metadata enables attaching extra info to a message. Uses include animations, effects, or simply to link it to other resources such as images or relative points in time.
5353

5454
`MessageMetadata: Record<string, unknown>`
5555

56-
#### MessageHeaders <a id="messageheaders"/>
56+
#### MessageHeaders
5757

5858
Headers enable attaching extra info to a message. Uses include linking to a relative point in time of a livestream video or flagging this message as important or pinned.
5959

@@ -81,7 +81,7 @@ const message = await room.messages.send({
8181

8282
Update a message in the chat room.
8383

84-
Note that the Promise may resolve before or after the updated message is received from the room. This means you may see the update that was just sent in a callback to `subscribe()` before the returned promise resolves.
84+
Note that the promise may resolve before or after the updated message is received from the room. This means you may see the update that was just sent in a callback to `subscribe()` before the returned promise resolves.
8585

8686
The [`Message`](/docs/chat/api/javascript/message) instance returned by this method is the state of the message as a result of the update operation. If you have a subscription to message events via `subscribe()`, you should discard the message instance returned by this method and use the event payloads from the subscription instead.
8787

@@ -165,7 +165,7 @@ Delete a message in the chat room.
165165

166166
This method performs a 'soft' delete, meaning the message is marked as deleted.
167167

168-
Note that the Promise may resolve before or after the message is deleted from the realtime channel. This means you may see the message that was just deleted in a callback to `subscribe` before the returned promise resolves.
168+
Note that the promise may resolve before or after the message is deleted from the realtime channel. This means you may see the message that was just deleted in a callback to `subscribe` before the returned promise resolves.
169169

170170
The [`Message`](/docs/chat/api/javascript/message) instance returned by this method is the state of the message as a result of the delete operation. If you have a subscription to message events via `subscribe()`, you should discard the message instance returned by this method and use the event payloads from the subscription instead.
171171

@@ -215,7 +215,7 @@ const deletedMessage = await room.messages.delete(
215215

216216
Get messages that have been previously sent to the chat room, based on the provided options.
217217

218-
Note that the [`historyBeforeSubscribe()`](#historybeforesubscribe) method enables clients to retrieve messages in a continuous manner when they first subscribe to a room, or rejoin after a period of disconnection.
218+
Note that the [`historyBeforeSubscribe()`](#historyBeforeSubscribe) method enables clients to retrieve messages in a continuous manner when they first subscribe to a room, or rejoin after a period of disconnection.
219219

220220
`history(options: QueryOptions): Promise<PaginatedResult<Message>>`
221221

src/pages/docs/chat/api/javascript/occupancy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Occupancy
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the Occupancy interface."
44
---
55

66
The `Occupancy` interface is used to subscribe to occupancy updates and fetch the occupancy metrics of a room.

src/pages/docs/chat/api/javascript/presence.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Presence
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the Presence interface."
44
---
55

66
The `Presence` interface is used to enter and subscribe to the presence set of a chat room.
@@ -47,7 +47,7 @@ await room.presence.enter({status: 'online', activity: 'viewing'});
4747

4848
`room.presence.update()`
4949

50-
Updates a client's presence `data`. Will emit an `update` event to all subscribers. If the client is not already in the presence set, it will be treated as an [`enter`](LINK) event.
50+
Updates a client's presence `data`. Will emit an `update` event to all subscribers. If the client is not already in the presence set, it will be treated as an [`enter`](#enter) event.
5151

5252
`update(data?: unknown): Promise<void>`
5353

@@ -202,7 +202,7 @@ if (isPresent) {
202202

203203
Subscribe the provided listener to a list of presence events.
204204

205-
Note: This requires presence events to be enabled via the `enableEvents` option in the [`PresenceOptions`](LINK) provided to the room. If this is not enabled, an error will be thrown.
205+
Note: This requires presence events to be enabled via the `enableEvents` option in the [`PresenceOptions`](/docs/chat/api/javascript/rooms#PresenceOptions) provided to the room. If this is not enabled, an error will be thrown.
206206

207207
`subscribe(eventOrEvents: PresenceEventType | PresenceEventType[], listener?: PresenceListener): Subscription`
208208

src/pages/docs/chat/api/javascript/room-reactions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: RoomReactions
3-
meta_description: ""
3+
meta_description: "Ably Chat JavaScript API references for the RoomReactions interface."
44
---
55

66
The `RoomReactions` interface is used to send and subscribe to ephemeral, room-level reactions.

0 commit comments

Comments
 (0)