From 58e447b3758d5a400b13b742d43e84128231a4b8 Mon Sep 17 00:00:00 2001 From: Eana Hufwe Date: Tue, 4 Jan 2022 22:42:41 -0800 Subject: [PATCH] feat: add Web WC error message prompt for ID 3 (fixes #113) --- CHANGES.rst | 2 ++ efb_wechat_slave/__init__.py | 3 +++ efb_wechat_slave/__version__.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index e579b20..5bad6ec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,6 +19,7 @@ Added - Remove log in session file before reauth attempts if the file is older than 5 minutes. - Add support to App Message type 4 - Avoid including repetitive quotations (`#122`_) +- Add Web WC error message prompt for ID 3 (`#113`_) Changed ------- @@ -114,3 +115,4 @@ First release. .. _2.0.5: https://ews.1a23.studio/compare/v2.0.4...v2.0.5 .. _#108: https://github.com/ehForwarderBot/efb-wechat-slave/issues/108 .. _#122: https://github.com/ehForwarderBot/efb-wechat-slave/issues/122 +.. _#123: https://github.com/ehForwarderBot/efb-wechat-slave/issues/123 diff --git a/efb_wechat_slave/__init__.py b/efb_wechat_slave/__init__.py index 57fd479..37b8cd4 100644 --- a/efb_wechat_slave/__init__.py +++ b/efb_wechat_slave/__init__.py @@ -770,6 +770,9 @@ def substitute_known_error_reason(self, err: wxpy.ResponseError) -> wxpy.Respons elif err.err_code == 1205: err.err_msg = self._("You might have sent your messages too fast. Please try to slow down " "and retry after a while.") + elif err.err_code == 3: + err.err_msg = self._("Your mobile WeChat client is offline for too long. Please ensure your mobile" + "WeChat client is always online.") else: err.err_msg = self._("This is an unknown error from Web WeChat which we know nothing about why this " "is happening. If you have seen a pattern or if you happen to know the reason " diff --git a/efb_wechat_slave/__version__.py b/efb_wechat_slave/__version__.py index 0ad32bd..84ac215 100644 --- a/efb_wechat_slave/__version__.py +++ b/efb_wechat_slave/__version__.py @@ -1,3 +1,3 @@ # coding: utf-8 -__version__ = "2.0.6.dev7" +__version__ = "2.0.6.dev8"