From dc5144fdb9f359e21e4901b523738ae1b20cbcd6 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Tue, 26 Mar 2019 14:30:57 +0100 Subject: Inform the user and re-instate 0199 pinger on a successful 0198 resume --- poezio/core/core.py | 1 + poezio/core/handlers.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/poezio/core/core.py b/poezio/core/core.py index 1f02c3d8..6f840dc2 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -258,6 +258,7 @@ class Core: ('session_start', self.handler.on_session_start_features), ('session_end', self.handler.on_session_end), ('sm_failed', self.handler.on_session_end), + ('session_resumed', self.handler.on_session_resumed), ('ssl_cert', self.handler.validate_ssl), ('ssl_invalid_chain', self.handler.ssl_invalid_chain), ('stream_error', self.handler.on_stream_error), diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index 955f8f58..614cabe4 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -1161,6 +1161,13 @@ class HandlerCore: for tab in self.core.get_tabs(tabs.MucTab): tab.disconnect() + def on_session_resumed(self, event): + """ + Called when a session is successfully resumed by 0198 + """ + self.core.information("Resumed session as %s" % self.core.xmpp.boundjid.full, 'Info') + self.core.xmpp.plugin['xep_0199'].enable_keepalive() + async def on_disconnected(self, event): """ When we are disconnected from remote server -- cgit v1.2.3