From cd34cd06de3e4650eb2156029fdbcd1c8bd7874e Mon Sep 17 00:00:00 2001 From: Tulir Asokan <tulir@maunium.net> Date: Sun, 5 Jul 2020 14:24:22 +0300 Subject: [PATCH] Don't send listen error notice when temporary_disconnect_notices is false and refresh_on_reconnection_fail is true --- mautrix_facebook/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mautrix_facebook/user.py b/mautrix_facebook/user.py index 87ae1bf..24a4a34 100644 --- a/mautrix_facebook/user.py +++ b/mautrix_facebook/user.py @@ -464,7 +464,8 @@ class User(BaseUser): else "Failed to connect to") message = f"{event} Facebook Messenger: {e}. {next_action}" self.log.warning(message) - await self.send_bridge_notice(message, important=not refresh) + if not refresh or self.temp_disconnect_notices: + await self.send_bridge_notice(message, important=not refresh) if refresh: self._prev_reconnect_fail_refresh = time.monotonic() self.loop.create_task(self.try_refresh()) -- GitLab