summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2017-11-02 12:54:48 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-14 11:55:54 +0000
commit395435c68dc656641e7bdb53da88773482dd55b5 (patch)
tree5d002b72639b49abe316eb1123c1981d93d8e6a5
parent0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd (diff)
downloadpoezio-395435c68dc656641e7bdb53da88773482dd55b5.tar.gz
poezio-395435c68dc656641e7bdb53da88773482dd55b5.tar.bz2
poezio-395435c68dc656641e7bdb53da88773482dd55b5.tar.xz
poezio-395435c68dc656641e7bdb53da88773482dd55b5.zip
self-ping: add 'timeout' option for ping response
-rw-r--r--poezio/config.py1
-rw-r--r--poezio/tabs/muctab.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/poezio/config.py b/poezio/config.py
index a3bc5685..9c06d25b 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -104,6 +104,7 @@ DEFAULT_CONFIG = {
'roster_sort': 'jid:show',
'save_status': True,
'self_ping_interval': 0,
+ 'self_ping_timeout': 60,
'send_chat_states': True,
'send_initial_presence': True,
'send_os_info': True,
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 529cdafd..13feb552 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1091,12 +1091,13 @@ class MucTab(ChatTab):
self.self_ping_event = None
def send_self_ping(self):
+ timeout = config.get_by_tabname("self_ping_timeout", self.general_jid, default=60)
to = self.name + "/" + self.own_nick
self.core.xmpp.plugin['xep_0199'].send_ping(
jid=to,
callback=self.on_self_ping_result,
timeout_callback=self.on_self_ping_failed,
- timeout=60)
+ timeout=timeout)
def on_self_ping_result(self, iq):
if iq["type"] == "error" and iq["error"]["condition"] != "feature-not-implemented":