diff --git a/change-beta/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json b/change-beta/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json new file mode 100644 index 00000000000..5faa96bbf49 --- /dev/null +++ b/change-beta/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json @@ -0,0 +1,9 @@ +{ + "type": "patch", + "area": "fix", + "workstream": "Breakout rooms", + "comment": "Ensure createChatAdapterCallback is set for AzureCommunicationCallWithChatAdapter in createAzureCommunicationCallWithChatAdapterFromClients so that a new ChatAdapter can be created when joining a breakout room", + "packageName": "@azure/communication-react", + "email": "79475487+mgamis-msft@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json b/change/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json new file mode 100644 index 00000000000..5faa96bbf49 --- /dev/null +++ b/change/@azure-communication-react-ae4dd794-8396-42ec-b246-234e9dfc7214.json @@ -0,0 +1,9 @@ +{ + "type": "patch", + "area": "fix", + "workstream": "Breakout rooms", + "comment": "Ensure createChatAdapterCallback is set for AzureCommunicationCallWithChatAdapter in createAzureCommunicationCallWithChatAdapterFromClients so that a new ChatAdapter can be created when joining a breakout room", + "packageName": "@azure/communication-react", + "email": "79475487+mgamis-msft@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts b/packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts index 7ffd3095eca..244634fd227 100644 --- a/packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts +++ b/packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts @@ -1471,7 +1471,12 @@ export const createAzureCommunicationCallWithChatAdapterFromClients = async ({ callAdapterOptions ); const chatAdapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient); - return new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter); + const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter); + /* @conditional-compile-remove(breakout-rooms) */ + callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) => + createAzureCommunicationChatAdapterFromClient(chatClient, chatClient.getChatThreadClient(threadId)) + ); + return callWithChatAdapter; }; /**