diff --git a/extensions/msteams/src/monitor-handler.file-consent.test.ts b/extensions/msteams/src/monitor-handler.file-consent.test.ts index b2a0bb3a73d..7af8931ed12 100644 --- a/extensions/msteams/src/monitor-handler.file-consent.test.ts +++ b/extensions/msteams/src/monitor-handler.file-consent.test.ts @@ -159,7 +159,7 @@ describe("msteams file consent invoke authz", () => { await vi.waitFor(() => { expect(fileConsentMockState.uploadToConsentUrl).toHaveBeenCalledTimes(1); }); - + expect(fileConsentMockState.uploadToConsentUrl).toHaveBeenCalledWith( expect.objectContaining({ url: "https://upload.example.com/put", diff --git a/extensions/msteams/src/monitor-handler.ts b/extensions/msteams/src/monitor-handler.ts index 6a7d6a47c11..27d3e06929f 100644 --- a/extensions/msteams/src/monitor-handler.ts +++ b/extensions/msteams/src/monitor-handler.ts @@ -145,7 +145,7 @@ export function registerMSTeamsHandlers( if (ctx.activity?.type === "invoke" && ctx.activity?.name === "fileConsent/invoke") { // Send invoke response IMMEDIATELY to prevent Teams timeout await ctx.sendActivity({ type: "invokeResponse", value: { status: 200 } }); - + // Handle file upload asynchronously (don't await) handleFileConsentInvoke(ctx, deps.log).catch((err) => { deps.log.debug?.("file consent handler error", { error: String(err) });