mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-12 06:50:45 +08:00
Add manual IM bot credential access
This commit is contained in:
parent
d5d2c18ce0
commit
7123fce47a
42 changed files with 2458 additions and 889 deletions
|
|
@ -45,6 +45,7 @@ export function isBotSender(event) {
|
|||
|
||||
export function isAllowedSender(event, allowedOpenIds) {
|
||||
if (!allowedOpenIds || allowedOpenIds.size === 0) return false;
|
||||
if (allowedOpenIds.has('*')) return true;
|
||||
const senderOpenId = event?.sender?.sender_id?.open_id;
|
||||
return typeof senderOpenId === 'string' && allowedOpenIds.has(senderOpenId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue