refactor: dedupe msteams handler record helper

This commit is contained in:
Peter Steinberger
2026-04-06 22:51:53 +01:00
parent a8ac0b7976
commit 0b7f6fa9d0

View File

@@ -18,6 +18,7 @@ import {
import {
buildMSTeamsAttachmentPlaceholder,
buildMSTeamsMediaPayload,
isRecord,
type MSTeamsAttachmentLike,
summarizeMSTeamsHtmlAttachments,
} from "../attachments.js";
@@ -39,9 +40,6 @@ import {
wasMSTeamsBotMentioned,
} from "../inbound.js";
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null;
}
function extractTextFromHtmlAttachments(attachments: MSTeamsAttachmentLike[]): string {
for (const attachment of attachments) {
if (attachment.contentType !== "text/html") {