fix: default groupPolicy to allowlist
This commit is contained in:
@@ -982,7 +982,7 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
||||
}
|
||||
|
||||
if (isGroup && useAccessGroups) {
|
||||
const groupPolicy = telegramCfg.groupPolicy ?? "open";
|
||||
const groupPolicy = telegramCfg.groupPolicy ?? "allowlist";
|
||||
if (groupPolicy === "disabled") {
|
||||
await bot.api.sendMessage(
|
||||
chatId,
|
||||
@@ -1211,10 +1211,10 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
||||
}
|
||||
}
|
||||
// Group policy filtering: controls how group messages are handled
|
||||
// - "open" (default): groups bypass allowFrom, only mention-gating applies
|
||||
// - "open": groups bypass allowFrom, only mention-gating applies
|
||||
// - "disabled": block all group messages entirely
|
||||
// - "allowlist": only allow group messages from senders in groupAllowFrom/allowFrom
|
||||
const groupPolicy = telegramCfg.groupPolicy ?? "open";
|
||||
const groupPolicy = telegramCfg.groupPolicy ?? "allowlist";
|
||||
if (groupPolicy === "disabled") {
|
||||
logVerbose(`Blocked telegram group message (groupPolicy: disabled)`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user