From b08c5ce617258a99bebc2c5e44e47ff8f4f64406 Mon Sep 17 00:00:00 2001 From: Brandon George <54326470+Brandon092099@users.noreply.github.com> Date: Mon, 3 Mar 2025 13:44:23 -0500 Subject: [PATCH] Fix "Missing Activity.Recipient" issue while connecting to botbuilder. Add from and recipient values to createMessageActivity and add recipient values to createConversationUpdateActivity. --- src/bridge.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bridge.ts b/src/bridge.ts index 847fae5..f1ef791 100644 --- a/src/bridge.ts +++ b/src/bridge.ts @@ -272,7 +272,7 @@ const deleteStateForUser = (req: express.Request, res: express.Response) => { // CLIENT ENDPOINT HELPERS const createMessageActivity = (incomingActivity: IMessageActivity, serviceUrl: string, conversationId: string): IMessageActivity => { - return { ...incomingActivity, channelId: 'emulator', serviceUrl, conversation: { id: conversationId }, id: uuidv4() }; + return { ...incomingActivity, from: { id: 'offline-directline', name: 'Offline Directline Server' }, recipient: { id: 'bot1', name: 'bot' }, channelId: 'emulator', serviceUrl, conversation: { id: conversationId }, id: uuidv4() }; }; const createConversationUpdateActivity = (serviceUrl: string, conversationId: string): IConversationUpdateActivity => { @@ -285,6 +285,7 @@ const createConversationUpdateActivity = (serviceUrl: string, conversationId: st membersAdded: [], membersRemoved: [], from: { id: 'offline-directline', name: 'Offline Directline Server' }, + recipient: { id: 'bot1', name: 'bot' }, }; return activity; };