From 98d14850edf153fb934aa227c851c24b790dfd17 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Wed, 4 Dec 2024 13:02:25 +0100 Subject: [PATCH] Renamed `finish` to `unsubscribe`. --- content/chat/connect.textile | 6 +++--- content/chat/rooms/index.textile | 4 ++-- content/chat/rooms/messages.textile | 4 ++-- content/chat/rooms/occupancy.textile | 4 ++-- content/chat/rooms/presence.textile | 4 ++-- content/chat/rooms/reactions.textile | 4 ++-- content/chat/rooms/typing.textile | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/content/chat/connect.textile b/content/chat/connect.textile index 1ececdad1f..beddd5d161 100644 --- a/content/chat/connect.textile +++ b/content/chat/connect.textile @@ -122,10 +122,10 @@ blang[javascript]. blang[react]. blang[swift]. - To stop the subscription from firing new status events, call its @finish()@ function: + To stop the subscription from firing new status events, call its @unsubscribe()@ function: ```[swift] - subscription.finish() + subscription.unsubscribe() ``` h2(#discontinuity). Handle connection discontinuity @@ -141,7 +141,7 @@ blang[react]. Any hooks that take an optional listener to monitor their events, such as typing indicator events in the @useTyping@ hook, can also register a listener to be notified of, and handle, periods of discontinuity. blang[swift]. - Each feature of the Chat SDK provides an @subscribeToDiscontinuities()@ method to assist with this. This enables you to create a subscription that will fire an event when discontinuity occurs in that feature so that you can handle it, as needed. As mentioned above, to stop your subscription from firing new events call its @finish()@ method. + Each feature of the Chat SDK provides an @subscribeToDiscontinuities()@ method to assist with this. This enables you to create a subscription that will fire an event when discontinuity occurs in that feature so that you can handle it, as needed. As mentioned above, to stop your subscription from firing new events call its @unsubscribe()@ method. For example, for messages: diff --git a/content/chat/rooms/index.textile b/content/chat/rooms/index.textile index 466bcf36c2..571202d5fa 100644 --- a/content/chat/rooms/index.textile +++ b/content/chat/rooms/index.textile @@ -293,8 +293,8 @@ blang[swift]. } ``` - To cancel the room status subscribtion, call the provided @finish()@ method: + To cancel the room status subscribtion, call the provided @unsubscribe()@ method: ```[swift] - statusSubscription.finish() + statusSubscription.unsubscribe() ``` diff --git a/content/chat/rooms/messages.textile b/content/chat/rooms/messages.textile index eca2cd0d10..b1c2ee1ac6 100644 --- a/content/chat/rooms/messages.textile +++ b/content/chat/rooms/messages.textile @@ -109,10 +109,10 @@ blang[react]. When you unmount the component that is using the @useMessages@ hook, it will automatically handle unsubscribing any associated listeners registered to receive messages. blang[swift]. - To cancel the room messages subscribtion, call the provided @finish()@ method: + To cancel the room messages subscribtion, call the provided @unsubscribe()@ method: ```[swift] - messagesSubscription.finish() + messagesSubscription.unsubscribe() ``` h2(#send). Send a message diff --git a/content/chat/rooms/occupancy.textile b/content/chat/rooms/occupancy.textile index 4e54bb206e..a3e6fc51d7 100644 --- a/content/chat/rooms/occupancy.textile +++ b/content/chat/rooms/occupancy.textile @@ -109,10 +109,10 @@ blang[react]. When you unmount the component that is using the @useOccupancy@ hook, it will automatically handle unsubscribing any associated listeners registered for room occupancy. blang[swift]. - To cancel the room occupancy subscribtion, call the provided @finish()@ method: + To cancel the room occupancy subscribtion, call the provided @unsubscribe()@ method: ```[swift] - occupancySubscription.finish() + occupancySubscription.unsubscribe() ``` h2(#retrieve). Retrieve room occupancy diff --git a/content/chat/rooms/presence.textile b/content/chat/rooms/presence.textile index e4e187baf3..9b8bf2b584 100644 --- a/content/chat/rooms/presence.textile +++ b/content/chat/rooms/presence.textile @@ -135,10 +135,10 @@ blang[react]. When you unmount the component that is using the @usePresenceListener@ hook, it will automatically handle unsubscribing any associated listeners registered for presence status updates. blang[swift]. - To cancel the room presence subscribtion, call the provided @finish()@ method: + To cancel the room presence subscribtion, call the provided @unsubscribe()@ method: ```[swift] - presenceSubscription.finish() + presenceSubscription.unsubscribe() ``` h2(#set). Set user presence diff --git a/content/chat/rooms/reactions.textile b/content/chat/rooms/reactions.textile index c73f2f33bb..b741954bf7 100644 --- a/content/chat/rooms/reactions.textile +++ b/content/chat/rooms/reactions.textile @@ -109,10 +109,10 @@ blang[react]. When you unmount the component that is using the @useRoomReactions@ hook, it will automatically handle unsubscribing any associated listeners registered for room reactions. blang[swift]. - To cancel the room reactions subscribtion, call the provided @finish()@ method: + To cancel the room reactions subscribtion, call the provided @unsubscribe()@ method: ```[swift] - reactionSubscription.finish() + reactionSubscription.unsubscribe() ``` h2(#send). Send a room reaction diff --git a/content/chat/rooms/typing.textile b/content/chat/rooms/typing.textile index ce4a0953f1..8bdb82189e 100644 --- a/content/chat/rooms/typing.textile +++ b/content/chat/rooms/typing.textile @@ -105,10 +105,10 @@ blang[react]. When you unmount the component that is using the @useTyping@ hook, it will automatically handle unsubscribing any associated listeners registered for typing events. blang[swift]. - To cancel the room typing subscribtion, call the provided @finish()@ method: + To cancel the room typing subscribtion, call the provided @unsubscribe()@ method: ```[swift] - typingSubscription.finish() + typingSubscription.unsubscribe() ``` h2(#set). Set typing status