fix: normalize telegram command mentions

This commit is contained in:
Ayaan Zaidi committed 2026-01-11 21:06:04 +05:30
1 parent 933c157092
commit 68f6f3f0bd
5 files changed
+65 -9

No files matched your search

+13
View File
@@ -71,4 +71,17 @@ describe("control command parsing", () => {
expect(hasControlCommand("prefix /send on")).toBe(false);
expect(hasControlCommand("/send on")).toBe(true);
});
it("ignores telegram commands addressed to other bots", () => {
expect(
hasControlCommand("/help@otherbot", undefined, {
botUsername: "clawdbot",
}),
).toBe(false);
expect(
hasControlCommand("/help@clawdbot", undefined, {
botUsername: "clawdbot",
}),
).toBe(true);
});
});