mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 01:20:21 +00:00
Telegram tests: route exact do not do that to control lane
This commit is contained in:
@@ -184,6 +184,11 @@ describe("createTelegramBot", () => {
|
||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "stop please" }),
|
||||
}),
|
||||
).toBe("telegram:123:control");
|
||||
expect(
|
||||
getTelegramSequentialKey({
|
||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "do not do that" }),
|
||||
}),
|
||||
).toBe("telegram:123:control");
|
||||
expect(
|
||||
getTelegramSequentialKey({
|
||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "остановись" }),
|
||||
@@ -204,6 +209,11 @@ describe("createTelegramBot", () => {
|
||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "/abort now" }),
|
||||
}),
|
||||
).toBe("telegram:123");
|
||||
expect(
|
||||
getTelegramSequentialKey({
|
||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "please do not do that" }),
|
||||
}),
|
||||
).toBe("telegram:123");
|
||||
});
|
||||
it("routes callback_query payloads as messages and answers callbacks", async () => {
|
||||
createTelegramBot({ token: "tok" });
|
||||
|
||||
Reference in New Issue
Block a user