Merge pull request #125 from jseagull/master
fix exception when message contains :<br/>
This commit is contained in:
@@ -281,7 +281,7 @@ class WebWeixin(object):
|
||||
elif Contact['UserName'] in SpecialUsers: # 特殊账号
|
||||
ContactList.remove(Contact)
|
||||
self.SpecialUsersList.append(Contact)
|
||||
elif Contact['UserName'].find('@@') != -1: # 群聊
|
||||
elif '@@' in Contact['UserName']: # 群聊
|
||||
ContactList.remove(Contact)
|
||||
self.GroupList.append(Contact)
|
||||
elif Contact['UserName'] == self.User['UserName']: # 自己
|
||||
@@ -696,8 +696,8 @@ class WebWeixin(object):
|
||||
|
||||
if msg['raw_msg']['FromUserName'][:2] == '@@':
|
||||
# 接收到来自群的消息
|
||||
if re.search(":<br/>", content, re.IGNORECASE):
|
||||
[people, content] = content.split(':<br/>')
|
||||
if ":<br/>" in content:
|
||||
[people, content] = content.split(':<br/>', 1)
|
||||
groupName = srcName
|
||||
srcName = self.getUserRemarkName(people)
|
||||
dstName = 'GROUP'
|
||||
|
||||
Reference in New Issue
Block a user