mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:21:26 +00:00
fix(telegram): fail closed on empty group allowFrom override
This commit is contained in:
committed by
Ayaan Zaidi
parent
81752564e9
commit
6bc7544a6a
@@ -42,6 +42,11 @@ export const evaluateTelegramGroupBaseAccess = (params: {
|
||||
return { allowed: true };
|
||||
}
|
||||
|
||||
// Explicit per-group/topic allowFrom override must fail closed when empty.
|
||||
if (!params.effectiveGroupAllow.hasEntries) {
|
||||
return { allowed: false, reason: "group-override-unauthorized" };
|
||||
}
|
||||
|
||||
const senderId = params.senderId ?? "";
|
||||
if (params.requireSenderForAllowOverride && !senderId) {
|
||||
return { allowed: false, reason: "group-override-unauthorized" };
|
||||
|
||||
Reference in New Issue
Block a user