mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-15 03:01:02 +00:00
test(telegram): cover threaded qa replies
This commit is contained in:
@@ -73,6 +73,7 @@ describe("telegram live qa runtime", () => {
|
||||
enabled: true,
|
||||
botToken: "sut-token",
|
||||
dmPolicy: "disabled",
|
||||
replyToMode: "first",
|
||||
groups: {
|
||||
"-100123": {
|
||||
groupPolicy: "allowlist",
|
||||
|
||||
@@ -2388,6 +2388,7 @@ describe("createTelegramBot", () => {
|
||||
});
|
||||
it("threads native command replies inside topics", async () => {
|
||||
commandSpy.mockClear();
|
||||
sendMessageSpy.mockClear();
|
||||
replySpy.mockResolvedValue({ text: "response" });
|
||||
|
||||
loadConfig.mockReturnValue({
|
||||
@@ -2396,6 +2397,7 @@ describe("createTelegramBot", () => {
|
||||
telegram: {
|
||||
dmPolicy: "open",
|
||||
allowFrom: ["*"],
|
||||
replyToMode: "first",
|
||||
groups: { "*": { requireMention: false } },
|
||||
},
|
||||
},
|
||||
@@ -2413,7 +2415,7 @@ describe("createTelegramBot", () => {
|
||||
expect(sendMessageSpy).toHaveBeenCalledWith(
|
||||
"-1001234567890",
|
||||
expect.any(String),
|
||||
expect.objectContaining({ message_thread_id: 99 }),
|
||||
expect.objectContaining({ message_thread_id: 99, reply_to_message_id: 42 }),
|
||||
);
|
||||
});
|
||||
it("reloads native command routing bindings between invocations without recreating the bot", async () => {
|
||||
|
||||
Reference in New Issue
Block a user