fix: wxcomapp user name

This commit is contained in:
zhayujie
2024-01-31 16:24:29 +08:00
parent 7e0fbd600f
commit 95708489c9
2 changed files with 13 additions and 4 deletions

View File

@@ -107,7 +107,11 @@ class LinkAIBot(Bot):
body["group_name"] = context.kwargs.get("msg").from_user_nickname
body["sender_name"] = context.kwargs.get("msg").actual_user_nickname
else:
body["sender_name"] = context.kwargs.get("msg").from_user_nickname
if body.get("channel_type") in ["wechatcom_app"]:
body["sender_name"] = context.kwargs.get("msg").from_user_id
else:
body["sender_name"] = context.kwargs.get("msg").from_user_nickname
except Exception as e:
pass
file_id = context.kwargs.get("file_id")