diff --git a/examples/package.json b/examples/package.json
index 37bb9aa07b..bbce29fa28 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -94,7 +94,7 @@
"spaces-member-location-react": "yarn workspace spaces-member-location-react dev"
},
"dependencies": {
- "@ably/chat": "^0.9.0",
+ "@ably/chat": "^0.10.0",
"@ably/spaces": "^0.4.0",
"ably": "^2.9.0",
"cors": "^2.8.5",
diff --git a/examples/yarn.lock b/examples/yarn.lock
index 129366962f..ba84955e5a 100644
--- a/examples/yarn.lock
+++ b/examples/yarn.lock
@@ -2,10 +2,10 @@
# yarn lockfile v1
-"@ably/chat@^0.9.0":
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/@ably/chat/-/chat-0.9.0.tgz#8d43baf891d51ba796c74c5d950b59641e0405cd"
- integrity sha512-8d2bbJTYfrSyuYW1jqFGuY0sdi8XmSlri6h9TAW7RlMglbSmQ6hXNHRbyvNf4FOF6ttvIjPRHpglmWMFC7MCoA==
+"@ably/chat@^0.10.0":
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/@ably/chat/-/chat-0.10.0.tgz#10a90c76726ea535a0a7847a786d3d06f44bafbc"
+ integrity sha512-74T/XAiYQkrNkRVcV18jnUjEiH23K3lOgt4yrZ0MXta0QJ9iWhqnemlmL+IDT9i/bN57AuhNXOVn8RdSSHjHnw==
dependencies:
async-mutex "^0.5.0"
dequal "^2.0.3"
@@ -2643,6 +2643,7 @@ statuses@2.0.1:
integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
+ name string-width-cjs
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
diff --git a/src/data/languages/languageData.ts b/src/data/languages/languageData.ts
index 5841623044..cfdcdc708a 100644
--- a/src/data/languages/languageData.ts
+++ b/src/data/languages/languageData.ts
@@ -24,8 +24,8 @@ export default {
chat: {
javascript: '0.10',
react: '0.10',
- swift: '0.4',
- kotlin: '0.3',
+ swift: '0.6',
+ kotlin: '0.5',
},
spaces: {
javascript: '0.4',
diff --git a/src/pages/docs/chat/rooms/reactions.mdx b/src/pages/docs/chat/rooms/reactions.mdx
index f6bcaf6c05..cc645fdd5b 100644
--- a/src/pages/docs/chat/rooms/reactions.mdx
+++ b/src/pages/docs/chat/rooms/reactions.mdx
@@ -41,13 +41,13 @@ const MyComponent = () => {
```swift
let reactionSubscription = room.reactions.subscribe()
for await event in reactionSubscription {
- print("Received a reaction of type \(event.reaction.type), and metadata \(event.reaction.metadata)")
+ print("Received a reaction of name \(event.reaction.name), and metadata \(event.reaction.metadata)")
}
```
```kotlin
val subscription = room.reactions.subscribe { event: RoomReactionEvent ->
- println("received a ${event.reaction.type} with metadata ${event.reaction.metadata}")
+ println("Received a reaciton of name ${event.reaction.name} with metadata ${event.reaction.metadata}")
}
```
@@ -56,8 +56,6 @@ val subscription = room.reactions.subscribe { event: RoomReactionEvent ->
The following are the properties of a room reaction event:
-
-
| Property | Description | Type |
| -------- | ----------- | ---- |
| type | The type of reaction event. | String |
@@ -69,21 +67,6 @@ The following are the properties of a room reaction event:
| | `clientId`: The client identifier of the user that sent the reaction. | String |
| | `isSelf`: Will be `true` for the user that sent the reaction. | Boolean |
-
-
-
-
-| Property | Description | Type |
-| -------- | ----------- | ---- |
-| type | The type of reaction, for example a 'like' or a heart emoji. | String |
-| headers | Optional headers for adding additional information to a reaction. | Object |
-| metadata | Optional metadata about the reaction, such as an animation or effect. This information is not read by Ably. | Object |
-| createdAt | The time the reaction was sent. | Date |
-| clientId | The client identifier of the user that sent the reaction. | String |
-| isSelf | Will be `true` for the user that sent the reaction. | Boolean |
-
-
-
### Unsubscribe from room reactions
@@ -106,8 +89,8 @@ When you unmount the component that is using the `useRoomReactions` hook, it wil
```javascript
// Initial subscription
-const {unsubscribe} = room.reactions.subscribe((reaction) => {
- console.log(`Received a reaction of type ${reaction.type}, and metadata ${reaction.metadata}`);
+const {unsubscribe} = room.reactions.subscribe((event) => {
+ console.log(`Received a reaction of type ${event.reaction.name}, and metadata ${event.reaction.metadata}`);
});
// To remove the listener
@@ -156,15 +139,15 @@ const MyComponent = () => {
```
```swift
-try await room.reactions.send(params: .init(type: "like"))
+try await room.reactions.send(params: .init(name: "like"))
-try await room.reactions.send(params: .init(type: "heart",
+try await room.reactions.send(params: .init(name: "heart",
metadata: ["effect": "fireworks"]))
```
```kotlin
-room.reactions.send(type = "like")
-room.reactions.send(type = "heart", metadata = JsonObject().apply {
+room.reactions.send(name = "like")
+room.reactions.send(name = "heart", metadata = JsonObject().apply {
addProperty("effect", "fireworks")
})
```