diff --git a/src/telegram/bot-access.test.ts b/src/telegram/bot-access.test.ts index b52e51faf87..4d147a420b7 100644 --- a/src/telegram/bot-access.test.ts +++ b/src/telegram/bot-access.test.ts @@ -2,14 +2,14 @@ import { describe, expect, it } from "vitest"; import { normalizeAllowFrom } from "./bot-access.js"; describe("normalizeAllowFrom", () => { - it("accepts signed numeric Telegram IDs and rejects usernames", () => { + it("accepts sender IDs and keeps negative chat IDs invalid", () => { const result = normalizeAllowFrom(["-1001234567890", " tg:-100999 ", "745123456", "@someone"]); expect(result).toEqual({ - entries: ["-1001234567890", "-100999", "745123456"], + entries: ["745123456"], hasWildcard: false, hasEntries: true, - invalidEntries: ["@someone"], + invalidEntries: ["-1001234567890", "-100999", "@someone"], }); }); });