Skip to content

Commit 18aa554

Browse files
further update to message update and delete
TODO squash into previous if ably/ably-chat-swift#429 merged, this is 453abb098d2f43d89b22474d47b0e2e1e8269252
1 parent d541226 commit 18aa554

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pages/docs/chat/getting-started/swift.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ struct ContentView: View {
487487

488488
do {
489489
let updateMessageParams = UpdateMessageParams(text: newMessage)
490-
_ = try await room.messages.update(forSerial: editingMessage.serial params: updateMessageParams, details: nil)
490+
_ = try await room.messages.update(withSerial: editingMessage.serial params: updateMessageParams, details: nil)
491491
self.editingMessage = nil
492492
newMessage = ""
493493
} catch {
@@ -1172,7 +1172,7 @@ private func deleteMessage(_ message: Message) async {
11721172
guard let room = room else { return }
11731173

11741174
do {
1175-
_ = try await room.messages.delete(forSerial: message.serial, details: nil)
1175+
_ = try await room.messages.delete(withSerial: message.serial, details: nil)
11761176
} catch {
11771177
print("Failed to delete message: \(error)")
11781178
}

src/pages/docs/chat/rooms/messages.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Message updates were added in version 0.3 for the JavaScript and React SDKs, and
224224
</Aside>
225225

226226
<If lang="javascript,swift,kotlin">
227-
Use the <If lang="javascript">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/interfaces/chat-js.Messages.html#update)</If><If lang="swift">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-swift/main/AblyChat/documentation/ablychat/messages/update%28forserial:params:details:%29)</If><If lang="kotlin">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/dokka/chat-android/com.ably.chat/-messages/update.html)</If> method to update a message in a chat room. All users that are [subscribed](#subscribe) to messages on that room will receive the update:
227+
Use the <If lang="javascript">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/interfaces/chat-js.Messages.html#update)</If><If lang="swift">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-swift/main/AblyChat/documentation/ablychat/messages/update%28withserial:params:details:%29)</If><If lang="kotlin">[`messages.update()`](https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/dokka/chat-android/com.ably.chat/-messages/update.html)</If> method to update a message in a chat room. All users that are [subscribed](#subscribe) to messages on that room will receive the update:
228228
</If>
229229

230230
<If lang="react">
@@ -423,7 +423,7 @@ Message deletion was added in version 0.3 for the JavaScript and React SDKs, and
423423
</Aside>
424424

425425
<If lang="javascript,swift,kotlin">
426-
Use the <If lang="javascript">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/interfaces/chat-js.Messages.html#delete)</If><If lang="swift">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-swift/main/AblyChat/documentation/ablychat/messages/delete%28forserial:details:%29)</If><If lang="kotlin">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/dokka/chat-android/com.ably.chat/-messages/delete.html)</If> method to delete a message in a chat room. All users that are [subscribed](#subscribe) to messages on that room will receive the deletion:
426+
Use the <If lang="javascript">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/interfaces/chat-js.Messages.html#delete)</If><If lang="swift">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-swift/main/AblyChat/documentation/ablychat/messages/delete%28withserial:details:%29)</If><If lang="kotlin">[`messages.delete()`](https://sdk.ably.com/builds/ably/ably-chat-kotlin/main/dokka/chat-android/com.ably.chat/-messages/delete.html)</If> method to delete a message in a chat room. All users that are [subscribed](#subscribe) to messages on that room will receive the deletion:
427427
</If>
428428

429429
<If lang="react">

0 commit comments

Comments
 (0)