fix(telegram): fail closed on empty group allowFrom override

This commit is contained in:
Brian Mendonca
2026-02-24 18:30:21 -07:00
committed by Ayaan Zaidi
parent 81752564e9
commit 6bc7544a6a
3 changed files with 84 additions and 0 deletions

View File

@@ -813,6 +813,29 @@ describe("createTelegramBot", () => {
},
expectedReplyCount: 1,
},
{
name: "blocks group messages when per-group allowFrom override is explicitly empty",
config: {
channels: {
telegram: {
groupPolicy: "open",
groups: {
"-100123456789": {
allowFrom: [],
requireMention: false,
},
},
},
},
},
message: {
chat: { id: -100123456789, type: "group", title: "Test Group" },
from: { id: 999999, username: "random" },
text: "hello",
date: 1736380800,
},
expectedReplyCount: 0,
},
{
name: "allows all group messages when groupPolicy is 'open'",
config: {