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

Saurabh R. Mehta 25 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.
894 questions
{count} votes

Accepted answer
  1. ajkuma 26,636 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 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.