Skip to content

Commit

Permalink
Replaced subscribeToDiscontinuities with onDiscontinuity.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Dec 11, 2024
1 parent 8ae80a8 commit 2fbd51c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ There may be instances where the connection to Ably is lost for a period of time
circumstances, the connection will recover and operation will continue with no discontinuity of messages. However, during extended
periods of disconnection, continuity cannot be guaranteed and you'll need to take steps to recover messages you might have missed.

Each feature of the Chat SDK provides an `subscribeToDiscontinuities` method. Here you can register a listener that will be notified whenever a
Each feature of the Chat SDK provides an `onDiscontinuity` method. Here you can register a listener that will be notified whenever a
discontinuity in that feature has been observed.

Taking messages as an example, you can listen for discontinuities like so:

```swift
let subscription = room.messages.subscribeToDiscontinuities()
let subscription = room.messages.onDiscontinuity()
for await error in subscription {
print("Recovering from the error: \(error)")
}
Expand Down

0 comments on commit 2fbd51c

Please sign in to comment.