Browse Source

fix: admin auth bug

develop
zhayujie 1 year ago
parent
commit
e34523028f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      plugins/linkai/linkai.py

+ 5
- 1
plugins/linkai/linkai.py View File

@@ -262,7 +262,11 @@ def _is_admin(e_context: EventContext) -> bool:
"""
context = e_context["context"]
if context["isgroup"]:
return context.kwargs.get("msg").actual_user_id in global_config["admin_users"]
actual_user_id= context.kwargs.get("msg").actual_user_id
for admin_user in global_config["admin_users"]:
if actual_user_id and actual_user_id in admin_user:
return True
return False
else:
return context["receiver"] in global_config["admin_users"]



Loading…
Cancel
Save