Created
February 12, 2017 10:04
-
-
Save RoyXiang/098eb476215e74777a35d43554dcbd2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/plugins/eh_wechat_slave.py b/plugins/eh_wechat_slave.py | |
| index 032608b..8318dd7 100644 | |
| --- a/plugins/eh_wechat_slave.py | |
| +++ b/plugins/eh_wechat_slave.py | |
| @@ -687,8 +687,12 @@ class WeChatChannel(EFBChannel): | |
| else: | |
| raise EFBMessageTypeNotSupported() | |
| - if isinstance(r, dict) and r.get('BaseResponse', dict()).get('Ret', -1) != 0: | |
| - raise EFBMessageError(str(r)) | |
| + if isinstance(r, dict): | |
| + ret = r.get('BaseResponse', dict()).get('Ret', -1) | |
| + if ret != 0: | |
| + if ret == 1101: | |
| + self.itchat.logout() | |
| + raise EFBMessageError(str(r)) | |
| else: | |
| msg.uid = r.get("MsgId", None) | |
| return msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment