mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-15 11:11:09 +00:00
refactor: dedupe msteams handler record helper
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user