Is it possible in Azure Chat SDK to limit chatMessageReceived event to a specific thread for a communicationUserId?

Saurabh R. Mehta 5 Reputation points
2024-06-14T12:38:19.5266667+00:00

In Azure Chat SDK, the chatMessageReceived event of chatClient is triggered on all active threads for the intended communicationUserId. I am wondering if there is any way to limit this event to a specific thread instead of all threads for the intended communicationUserId. Any guidance or resources would be greatly appreciated.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
781 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,396 Reputation points Microsoft Employee
    2024-06-26T13:49:59.15+00:00

    @Saurabh R. Mehta , Summarizing our discussion from the comments. Kindly Accept Answer - it will benefit the community to find the answers quickly.

    Requirement:

    In Azure Chat SDK, the chatMessageReceived event of chatClient is triggered on all active threads for the intended communicationUserId. is any way to limit this event to a specific thread instead of all threads for the intended communicationUserId?

    Scenario:

    User's image

    • User3 is a patient and User1 and User2 are Provider.
    • All chat conversation is a sperate Thread and since patient is consulting with two different providers here so Thread2 and Thread3 represents different chat conversation.

    Ask:

    What we want to do with Azure chat SDK:

    When communication is happening on Thread 3 and when User1 sends a message to User3 that message should be received on the same Thread.

    We are looking for an event which gets triggered for specific ThreadID. We are in health care domain and we can not broadcast the conversation happening between patient and provider1's Thread to another Thread where the same patient and another provider2 having conversation.

    Pointers/approach/behavior confirmation:

    Real-time notification is at user level. Users will receive notifications for all chat threads they are involved in. The UI application must determine where and whether a message should be displayed.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will benefit the community to find the answers quickly.

    0 comments No comments