From 3000eb5a8c54127b3ff902925b96c7f17d80645f Mon Sep 17 00:00:00 2001 From: chase535 <107602367+chase535@users.noreply.github.com> Date: Fri, 19 Aug 2022 01:21:59 +0800 Subject: [PATCH] Update messages.py --- WeChatPush/itchat/components/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatPush/itchat/components/messages.py b/WeChatPush/itchat/components/messages.py index 07db3b3..b47f200 100644 --- a/WeChatPush/itchat/components/messages.py +++ b/WeChatPush/itchat/components/messages.py @@ -81,7 +81,7 @@ def produce_msg(core, msgList): # by default we think there may be a user missing not a mp m['User'].core = core msg = {'ChatRoom': '0', 'NotifyCloseContact': '0'} - if m.getr(m.get('FromUserName')) == 'weixin': + if str(m.get('FromUserName')) == 'weixin': msg['Name'] = msg['NickName'] = '微信团队' elif '@@' in str(m.get('FromUserName')) or '@@' in str(m.get('ToUserName')): msg['ChatRoom'] = '1'