diff --git a/itchat/components/messages.py b/itchat/components/messages.py index ce1b88acbb2b62891d96ad1d390e3d4222894907..2cc1daddbd5454c57ee260ecde8a106c8a71fd66 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 6a987a0094a13ec94ce87e603a6f8c456af2a345..4d05b004b4931c18755e6ee9ca900bcdc74d773f 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()