mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 13:30:22 +00:00
fix(whatsapp): groupAllowFrom sender filter bypassed when groupPolicy is allowlist (#24670)
(cherry picked from commit af06ebd9a6)
This commit is contained in:
committed by
Peter Steinberger
parent
3f5e7f8156
commit
c6bb7b0c04
@@ -16,10 +16,17 @@ export function resolveGroupPolicyFor(cfg: ReturnType<typeof loadConfig>, conver
|
||||
ChatType: "group",
|
||||
Provider: "whatsapp",
|
||||
})?.id;
|
||||
const whatsappCfg = cfg.channels?.whatsapp as
|
||||
| { groupAllowFrom?: string[]; allowFrom?: string[] }
|
||||
| undefined;
|
||||
const hasGroupAllowFrom = Boolean(
|
||||
whatsappCfg?.groupAllowFrom?.length || whatsappCfg?.allowFrom?.length,
|
||||
);
|
||||
return resolveChannelGroupPolicy({
|
||||
cfg,
|
||||
channel: "whatsapp",
|
||||
groupId: groupId ?? conversationId,
|
||||
hasGroupAllowFrom,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user