refactor: dedupe feishu monitor record helper

This commit is contained in:
Peter Steinberger
2026-04-06 22:25:01 +01:00
parent 61fbc9ad2e
commit d0a1ecb768

View File

@@ -13,6 +13,7 @@ import { handleFeishuCardAction, type FeishuCardActionEvent } from "./card-actio
import { maybeHandleFeishuQuickActionMenu } from "./card-ux-launcher.js";
import { createEventDispatcher } from "./client.js";
import { handleFeishuCommentEvent } from "./comment-handler.js";
import { isRecord } from "./comment-shared.js";
import {
hasProcessedFeishuMessage,
recordProcessedFeishuMessage,
@@ -170,10 +171,6 @@ type FeishuBotMenuEvent = {
};
};
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null;
}
function readString(value: unknown): string | undefined {
return typeof value === "string" ? value : undefined;
}