microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
208 stars 225 forks source link

Echobot, how to make it leave the call #736

Open jamil-z opened 3 months ago

jamil-z commented 3 months ago

Describe the issue

hello! I would like some help with this, because when I have a group call, the bot joins correctly. After we all leave the call, echobot remains in the call. How could I make it leave when it detects that there are no participants left in the call?"

Code Snippet Insert the code snippet if any.

Expected behavior when detecting that there is no one left in the call, the bot should also leave, so that the group chat call ends

InDieTasten commented 3 months ago

On the call, you will find the participants collection. It's got an event you can subscribe. In your event handler, check the participant count (there might be other bots and your echo bot still in this list, so you need to filter those). If it's 0 remaining, you can use the communication client to "delete" the call.

Khadeer-techie commented 3 months ago

@jamil-z @InDieTasten I am not able to run the EchoBot application in local and also facing challenges in deploying the EchoBot. Below are the issues which I am facing currently, can you help me in resolving it? Local setup issue: https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/734 Deployment Issue: https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/737