fix (telegram/whatsapp): use account-scoped pairing allowlists

This commit is contained in:
Vignesh Natarajan
2026-02-15 19:09:07 -08:00
parent ee10feb80e
commit 6957354d48
6 changed files with 35 additions and 5 deletions

View File

@@ -127,6 +127,7 @@ async function resolveTelegramCommandAuth(params: {
msg: NonNullable<TelegramNativeCommandContext["message"]>;
bot: Bot;
cfg: OpenClawConfig;
accountId: string;
telegramCfg: TelegramAccountConfig;
allowFrom?: Array<string | number>;
groupAllowFrom?: Array<string | number>;
@@ -142,6 +143,7 @@ async function resolveTelegramCommandAuth(params: {
msg,
bot,
cfg,
accountId,
telegramCfg,
allowFrom,
groupAllowFrom,
@@ -156,6 +158,7 @@ async function resolveTelegramCommandAuth(params: {
const isForum = (msg.chat as { is_forum?: boolean }).is_forum === true;
const groupAllowContext = await resolveTelegramGroupAllowFromContext({
chatId,
accountId,
isForum,
messageThreadId,
groupAllowFrom,
@@ -371,6 +374,7 @@ export const registerTelegramNativeCommands = ({
msg,
bot,
cfg,
accountId,
telegramCfg,
allowFrom,
groupAllowFrom,
@@ -623,6 +627,7 @@ export const registerTelegramNativeCommands = ({
msg,
bot,
cfg,
accountId,
telegramCfg,
allowFrom,
groupAllowFrom,