mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 13:31:41 +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" }),
|
message: mockMessage({ chat: mockChat({ id: 123 }), text: "stop please" }),
|
||||||
}),
|
}),
|
||||||
).toBe("telegram:123:control");
|
).toBe("telegram:123:control");
|
||||||
|
expect(
|
||||||
|
getTelegramSequentialKey({
|
||||||
|
message: mockMessage({ chat: mockChat({ id: 123 }), text: "do not do that" }),
|
||||||
|
}),
|
||||||
|
).toBe("telegram:123:control");
|
||||||
expect(
|
expect(
|
||||||
getTelegramSequentialKey({
|
getTelegramSequentialKey({
|
||||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "остановись" }),
|
message: mockMessage({ chat: mockChat({ id: 123 }), text: "остановись" }),
|
||||||
@@ -204,6 +209,11 @@ describe("createTelegramBot", () => {
|
|||||||
message: mockMessage({ chat: mockChat({ id: 123 }), text: "/abort now" }),
|
message: mockMessage({ chat: mockChat({ id: 123 }), text: "/abort now" }),
|
||||||
}),
|
}),
|
||||||
).toBe("telegram:123");
|
).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 () => {
|
it("routes callback_query payloads as messages and answers callbacks", async () => {
|
||||||
createTelegramBot({ token: "tok" });
|
createTelegramBot({ token: "tok" });
|
||||||
|
|||||||
Reference in New Issue
Block a user