refactor: dedupe lowercased readers

This commit is contained in:
Peter Steinberger
2026-04-07 08:15:36 +01:00
parent 763dc614c0
commit a5ff85f01c
12 changed files with 28 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
import type { ReactionTypeEmoji } from "@grammyjs/types";
import { DEFAULT_EMOJIS, type StatusReactionEmojis } from "openclaw/plugin-sdk/channel-feedback";
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
import type { TelegramChatDetails, TelegramGetChat } from "./bot/types.js";
type StatusReactionEmojiKey = keyof Required<StatusReactionEmojis>;
@@ -114,7 +115,7 @@ const STATUS_REACTION_EMOJI_KEYS: StatusReactionEmojiKey[] = [
];
function normalizeEmoji(value: string | undefined): string | undefined {
const trimmed = value?.trim();
const trimmed = normalizeOptionalString(value);
return trimmed ? trimmed : undefined;
}