Skip to content

Commit

Permalink
fix: admin auth bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Sep 29, 2023
1 parent efe2fba commit e345230
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/linkai/linkai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit e345230

Please sign in to comment.