diff options
-rw-r--r-- | poezio/core/core.py | 1 | ||||
-rw-r--r-- | poezio/core/handlers.py | 7 |
2 files changed, 8 insertions, 0 deletions
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 |