



























@@ -3,10 +3,12 @@ import {
33formatEnvelopeTimestamp,
44stripAnsi,
55} from "openclaw/plugin-sdk/channel-test-helpers";
6+import type { TelegramGroupConfig } from "openclaw/plugin-sdk/config-contracts";
67import type { GetReplyOptions, MsgContext } from "openclaw/plugin-sdk/reply-runtime";
78import { sanitizeTerminalText } from "openclaw/plugin-sdk/test-fixtures";
89import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
910import type { TelegramBotOptions } from "./bot.types.js";
11+import type { TelegramGetChat } from "./bot/types.js";
1012const harness = await import("./bot.create-telegram-bot.test-harness.js");
1113const conversationRuntime = await import("openclaw/plugin-sdk/conversation-runtime");
1214const configMutation = await import("openclaw/plugin-sdk/config-mutation");
@@ -2481,7 +2483,8 @@ describe("createTelegramBot", () => {
2481248399,
24822484);
248324852484-expect(groupConfig?.requireMention).toBe(true);
2486+const group = groupConfig as TelegramGroupConfig | undefined;
2487+expect(group?.requireMention).toBe(true);
24852488expect(topicConfig?.requireMention).toBe(false);
24862489});
24872490@@ -2503,8 +2506,9 @@ describe("createTelegramBot", () => {
2503250699,
25042507);
250525082506-expect(groupConfig?.requireMention).toBe(false);
2507-expect(groupConfig?.allowFrom).toEqual(["123456789"]);
2509+const group = groupConfig as TelegramGroupConfig | undefined;
2510+expect(group?.requireMention).toBe(false);
2511+expect(group?.allowFrom).toEqual(["123456789"]);
25082512expect(topicConfig).toEqual({});
25092513});
25102514@@ -3021,7 +3025,7 @@ describe("createTelegramBot", () => {
30213025chatType: "supergroup",
30223026isGroup: true,
30233027isForum: undefined,
3024-getChat: getChatSpy,
3028+getChat: getChatSpy as TelegramGetChat,
30253029});
30263030const threadSpec = resolveTelegramThreadSpec({
30273031isGroup: true,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。