From 2fbd51c1086b0f9644c593ede36532ed76e2be62 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Wed, 11 Dec 2024 19:37:50 +0100 Subject: [PATCH] Replaced `subscribeToDiscontinuities` with `onDiscontinuity`. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3a94e7..1cfdce0 100644 --- a/README.md +++ b/README.md @@ -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)") }