mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:17:39 +00:00
fix (telegram/whatsapp): use account-scoped pairing allowlists
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user