extensions: fix MSTeams OneDrive fallback mention handling (#22472)

This commit is contained in:
Vincent Koc
2026-02-21 01:30:33 -05:00
committed by GitHub
parent d3bb924709
commit 569191fff1

View File

@@ -295,7 +295,7 @@ async function buildActivity(
// Teams only accepts base64 data URLs for images
const conversationType = conversationRef.conversation?.conversationType?.toLowerCase();
const isPersonal = conversationType === "personal";
const isImage = contentType?.startsWith("image/") ?? false;
const isImage = media.kind === "image";
if (
requiresFileConsent({
@@ -347,7 +347,7 @@ async function buildActivity(
return activity;
}
if (!isPersonal && !isImage && tokenProvider) {
if (!isPersonal && media.kind !== "image" && tokenProvider) {
// Fallback: no SharePoint site configured, try OneDrive upload
const uploaded = await uploadAndShareOneDrive({
buffer: media.buffer,