ably / ably-chat-js

Ably Chat SDK for JavaScript to build chat experiences at scale
https://ably-livestream-chat-demo.vercel.app/
Apache License 2.0
8 stars 0 forks source link

ChatClient `close` method #390

Open sacOO7 opened 1 week ago

sacOO7 commented 1 week ago

┆Issue is synchronized with this Jira Task by Unito

sacOO7 commented 1 week ago

Feel free to put your thoughts !

AndyTWF commented 1 week ago

free up all underlying channels before closing the app

Do you mean if the app shuts down entirely, or if it simply goes into the background / the chat component is closed? I presume the latter, as in the former case, freeing everything up happens by virtue of quitting the app / closing the browser tab.

Currently, devs need to iterate over each channel and release it explicitly

To be clear, you're referring to each room, as a group of channels pertaining to a chat room, rather than individual realtime channels?

We'll need to think about this one a bit more and its use-case - my preference would be to defer it for now so as to avoid adding complexity to the room lifecycle (notwithstanding any future requests for the functionality).