Merge 513f3556e7 into 09be5d45d5
This commit is contained in:
5 files changed
+61
-28
No files matched your search
@@ -398,7 +398,17 @@ export const googlechatPlugin: ChannelPlugin<ResolvedGoogleChatAccount> = {
|
||||
),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: normalized };
|
||||
const hasWildcard = allowListRaw.includes("*");
|
||||
if (hasWildcard || allowList.length === 0 || allowList.includes(normalized)) {
|
||||
return { ok: true, to: normalized };
|
||||
}
|
||||
if (mode === "implicit" || mode === "heartbeat") {
|
||||
return { ok: true, to: allowList[0] };
|
||||
}
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(`Google Chat target ${trimmed} is not in the allowFrom list.`),
|
||||
};
|
||||
}
|
||||
|
||||
if (allowList.length > 0) {
|
||||
|
||||
Reference in new issue
Block a user