Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.06k stars 1.19k forks source link

[Web] [ACS] [CHAT] Chat SDK timeouts like Calling SDK timeouts #26235

Closed pawansingh00 closed 1 month ago

pawansingh00 commented 1 year ago

Is your feature request related to a problem? Please describe.

Just like we have Reconnect/removal participant timeout for Calling SDK do we have anything like that for chat? Or is it like once a participant is added they are just added and never removed till we explicitly remove them (Consider cases like internet disconnected, in this case we can't really removeParticipant, so does that user gets removed from the chat after sometime? If yes, then after how much time? If No, how else should we handle it?)

image

Describe the solution you'd like In chat client also user should disconnect, and chatClient.on("participantsRemoved" event should be triggered on other connected users side, so we can handle scenarios like On Internet Disconnection on user1 side, other users say user2 and user3 are able to know that user1 has left/disconnected, so UI can be updated accrodingly.

pawansingh00 commented 1 year ago

@akania sorry to be desperate, I know you might be busy, but this has come kind of a blocker for us, in process of migrating from Tokbox to ACS, Can you please check this ASAP and confirm on it ASAP.

akania commented 1 year ago

hi @pawansingh00 , sorry for delay, we'll reply asap this week

pohtsng commented 4 months ago

Chat is different from calling because it doesn't require an active connection for chat to work. Chat is an asynchronous mode of communication. If you are interested in executing business logics (e.g. remove inactive participants/end chat thread) based on presence state, you can leverage https://learn.microsoft.com/en-us/azure/event-grid/communication-services-presence-events and/or implement some kind of heartbeat mechanisms.

akania commented 1 month ago

closing as answer was provided