refactor: centralize group sender identity

This commit is contained in:
Peter Steinberger committed 2026-01-17 03:32:48 +00:00
1 parent 204309dd3c
commit 3af391eec7
21 files changed
+236 -222

No files matched your search

@@ -352,15 +352,16 @@ export function createMSTeamsMessageHandler(deps: MSTeamsMessageHandlerDeps) {
channelData: activity.channelData,
},
log,
});
});
const mediaPayload = buildMSTeamsMediaPayload(mediaList);
const body = formatAgentEnvelope({
channel: "Teams",
from: senderName,
timestamp,
body: rawBody,
});
const mediaPayload = buildMSTeamsMediaPayload(mediaList);
const envelopeFrom = isDirectMessage ? senderName : conversationType;
const body = formatAgentEnvelope({
channel: "Teams",
from: envelopeFrom,
timestamp,
body: rawBody,
});
let combinedBody = body;
const isRoomish = !isDirectMessage;
const historyKey = isRoomish ? conversationId : undefined;