From e34523028f7009fde191ba7e9c779a7813995023 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Fri, 29 Sep 2023 15:52:34 +0800 Subject: [PATCH] fix: admin auth bug --- plugins/linkai/linkai.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/linkai/linkai.py b/plugins/linkai/linkai.py index 4e53c94..70fc083 100644 --- a/plugins/linkai/linkai.py +++ b/plugins/linkai/linkai.py @@ -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"]