fix: gate Teams media auth retries

This commit is contained in:
Peter Steinberger
2026-02-02 02:07:01 -08:00
parent f6d98a908a
commit 41cc5bcd4f
9 changed files with 115 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ export async function resolveMSTeamsInboundMedia(params: {
htmlSummary?: MSTeamsHtmlAttachmentSummary;
maxBytes: number;
allowHosts?: string[];
authAllowHosts?: string[];
tokenProvider: MSTeamsAccessTokenProvider;
conversationType: string;
conversationId: string;
@@ -46,6 +47,7 @@ export async function resolveMSTeamsInboundMedia(params: {
maxBytes,
tokenProvider,
allowHosts,
authAllowHosts: params.authAllowHosts,
preserveFilenames,
});
@@ -85,6 +87,7 @@ export async function resolveMSTeamsInboundMedia(params: {
tokenProvider,
maxBytes,
allowHosts,
authAllowHosts: params.authAllowHosts,
preserveFilenames,
});
attempts.push({

View File

@@ -403,6 +403,7 @@ export function createMSTeamsMessageHandler(deps: MSTeamsMessageHandlerDeps) {
maxBytes: mediaMaxBytes,
tokenProvider,
allowHosts: msteamsCfg?.mediaAllowHosts,
authAllowHosts: msteamsCfg?.mediaAuthAllowHosts,
conversationType,
conversationId,
conversationMessageId: conversationMessageId ?? undefined,