summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2017-11-02 12:54:27 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-14 11:55:11 +0000
commit0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd (patch)
treebff269bce57c4d64fc0f284a5b342859c158e43c
parent0fca40246be10aa460f59aa260683ca11445b451 (diff)
downloadpoezio-0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd.tar.gz
poezio-0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd.tar.bz2
poezio-0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd.tar.xz
poezio-0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd.zip
self-ping: rename option from 'delay' to 'interval'
-rw-r--r--poezio/config.py2
-rw-r--r--poezio/tabs/muctab.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 24e771fd..a3bc5685 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -103,7 +103,7 @@ DEFAULT_CONFIG = {
'roster_show_offline': False,
'roster_sort': 'jid:show',
'save_status': True,
- 'self_ping_delay': 0,
+ 'self_ping_interval': 0,
'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 a548aab5..529cdafd 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1076,11 +1076,13 @@ class MucTab(ChatTab):
def enable_self_ping_event(self):
delay = config.get_by_tabname(
"self_ping_delay", self.general_jid, default=0)
- if delay <= 0: # use 0 or some negative value to disable it
+ interval = int(config.get_by_tabname(
+ "self_ping_interval", self.general_jid, default=delay))
+ if interval <= 0: # use 0 or some negative value to disable it
return
self.disable_self_ping_event()
self.self_ping_event = timed_events.DelayedEvent(
- delay, self.send_self_ping)
+ interval, self.send_self_ping)
self.core.add_timed_event(self.self_ping_event)
def disable_self_ping_event(self):