Skip to content

Commit

Permalink
fix get_head_img bug (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwj718 authored and littlecodersh committed Mar 17, 2017
1 parent b4b2219 commit bdc7e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions itchat/components/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ def get_head_img(self, userName=None, chatroomUserName=None, picDir=None):
return ReturnValue({'BaseResponse': {
'ErrMsg': 'No chatroom found',
'Ret': -1001, }})
if chatroom['EncryChatRoomId'] == '':
if chatroom['UserName'] == '':
chatroom = self.update_chatroom(chatroomUserName)
params['chatroomid'] = chatroom['EncryChatRoomId']
params['chatroomid'] = chatroom['UserName']
headers = { 'User-Agent' : config.USER_AGENT }
r = self.s.get(url, params=params, stream=True, headers=headers)
tempStorage = io.BytesIO()
Expand Down

0 comments on commit bdc7e62

Please sign in to comment.