Fix bugs that "infinite selector == 2" problem

Fix the bug that after sending an image or file message the selector will be 2 forever util a text message was sent
This commit is contained in:
Haskely
2017-03-28 00:13:50 +08:00
committed by GitHub
parent 6ef4c8b0e0
commit 580edcaea7
+1 -1
View File
@@ -1390,7 +1390,7 @@ class WXBot:
r.encoding = 'utf-8' r.encoding = 'utf-8'
dic = json.loads(r.text) dic = json.loads(r.text)
if dic['BaseResponse']['Ret'] == 0: if dic['BaseResponse']['Ret'] == 0:
self.sync_key = dic['SyncKey'] self.sync_key = dic['SyncCheckKey']
self.sync_key_str = '|'.join([str(keyVal['Key']) + '_' + str(keyVal['Val']) self.sync_key_str = '|'.join([str(keyVal['Key']) + '_' + str(keyVal['Val'])
for keyVal in self.sync_key['List']]) for keyVal in self.sync_key['List']])
return dic return dic