summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2019-03-26 14:30:57 +0100
committerGeorg Lukas <georg@op-co.de>2019-03-26 14:56:48 +0100
commitdc5144fdb9f359e21e4901b523738ae1b20cbcd6 (patch)
treefce12573db3fae24c69346953343e53f242362d4
parent90a5b3d352529d396088476d299950baf09cadf7 (diff)
downloadpoezio-dc5144fdb9f359e21e4901b523738ae1b20cbcd6.tar.gz
poezio-dc5144fdb9f359e21e4901b523738ae1b20cbcd6.tar.bz2
poezio-dc5144fdb9f359e21e4901b523738ae1b20cbcd6.tar.xz
poezio-dc5144fdb9f359e21e4901b523738ae1b20cbcd6.zip
Inform the user and re-instate 0199 pinger on a successful 0198 resume
-rw-r--r--poezio/core/core.py1
-rw-r--r--poezio/core/handlers.py7
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