From f72cd13fbadac31f0da581acf3e743a835ed41a2 Mon Sep 17 00:00:00 2001 From: befantasy <31535803+befantasy@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:18:04 +0800 Subject: [PATCH] Update wechat_message.py --- channel/wechat/wechat_message.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/channel/wechat/wechat_message.py b/channel/wechat/wechat_message.py index 406162a..cf8b3e6 100644 --- a/channel/wechat/wechat_message.py +++ b/channel/wechat/wechat_message.py @@ -34,6 +34,9 @@ class WechatMessage(ChatMessage): self.actual_user_nickname = re.findall(r"\"(.*?)\"", itchat_msg["Content"])[-1] elif "加入群聊" in itchat_msg["Content"]: self.actual_user_nickname = re.findall(r"\"(.*?)\"", itchat_msg["Content"])[0] + elif "你已添加了" in itchat_msg["Content"]: #通过好友请求 + self.ctype = ContextType.ACCEPT_FRIEND + self.content = itchat_msg["Content"] elif "拍了拍我" in itchat_msg["Content"]: self.ctype = ContextType.PATPAT self.content = itchat_msg["Content"]