From 0ee4bb6129c9bd3d6db196c1007c24dc26b93fbd Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Thu, 2 Nov 2017 12:54:27 +0100 Subject: self-ping: rename option from 'delay' to 'interval' --- poezio/config.py | 2 +- poezio/tabs/muctab.py | 6 ++++-- 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): -- cgit v1.2.3