diff --git a/itchat/components/messages.py b/itchat/components/messages.py index ce1b88ac..2cc1dadd 100644 --- a/itchat/components/messages.py +++ b/itchat/components/messages.py @@ -74,6 +74,7 @@ def produce_msg(core, msgList): core.search_friends(userName=actualOpposite) or \ templates.User(userName=actualOpposite) # by default we think there may be a user missing not a mp + m['User'].core = core if m['MsgType'] == 1: # words if m['Url']: regx = r'(.+?\(.+?\))' @@ -102,6 +103,7 @@ def produce_msg(core, msgList): 'FileName' : '%s.mp3' % time.strftime('%y%m%d-%H%M%S', time.localtime()), 'Text': download_fn,} elif m['MsgType'] == 37: # friends + m['User']['UserName'] = m['RecommendInfo']['UserName'] msg = { 'Type': 'Friends', 'Text': { diff --git a/itchat/config.py b/itchat/config.py index 6a987a00..4d05b004 100644 --- a/itchat/config.py +++ b/itchat/config.py @@ -1,6 +1,6 @@ import os, platform -VERSION = '1.2.31' +VERSION = '1.3.0' BASE_URL = 'https://login.weixin.qq.com' OS = platform.system() #Windows, Linux, Darwin DIR = os.getcwd()