summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-08 20:52:55 +0200
committermathieui <mathieui@mathieui.net>2021-04-08 20:52:55 +0200
commitb60a828661f9c42ded23081092a46331c1df611d (patch)
tree1202aeaf67f12783cadf255f96638a92284a97b4
parentdafe5b9e247d775cc7d719d88ac4b0b54a2bd623 (diff)
downloadpoezio-b60a828661f9c42ded23081092a46331c1df611d.tar.gz
poezio-b60a828661f9c42ded23081092a46331c1df611d.tar.bz2
poezio-b60a828661f9c42ded23081092a46331c1df611d.tar.xz
poezio-b60a828661f9c42ded23081092a46331c1df611d.zip
fix: beep_on was broken with config changes
-rw-r--r--poezio/core/handlers.py12
-rw-r--r--poezio/tabs/muctab.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 55792cbd..25639eed 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -236,7 +236,7 @@ class HandlerCore:
if password:
msg += ". The password is \"%s\"." % password
self.core.information(msg, 'Info')
- if 'invite' in config.getlist('beep_on'):
+ if 'invite' in config.getstr('beep_on').split():
curses.beep()
logger.log_roster_change(inviter.full, 'invited you to %s' % jid.full)
self.core.pending_invites[jid.bare] = inviter.full
@@ -267,7 +267,7 @@ class HandlerCore:
msg += "\nreason: %s" % reason
self.core.information(msg, 'Info')
- if 'invite' in config.getlist('beep_on'):
+ if 'invite' in config.getstr('beep_on').split():
curses.beep()
self.core.pending_invites[room.bare] = inviter.full
@@ -430,7 +430,7 @@ class HandlerCore:
)
)
- if not own and 'private' in config.getlist('beep_on'):
+ if not own and 'private' in config.getstr('beep_on').split():
if not config.get_by_tabname('disable_beep', conv_jid.bare):
curses.beep()
if self.core.tabs.current_tab is not conversation:
@@ -651,7 +651,7 @@ class HandlerCore:
current.input.refresh()
self.core.doupdate()
- if 'message' in config.getlist('beep_on'):
+ if 'message' in config.getstr('beep_on').split():
if (not config.get_by_tabname('disable_beep', room_from)
and self.core.own_nick != message['from'].resource):
curses.beep()
@@ -735,7 +735,7 @@ class HandlerCore:
else:
tab.last_remote_message = datetime.now()
- if not sent and 'private' in config.getlist('beep_on'):
+ if not sent and 'private' in config.getstr('beep_on').split():
if not config.get_by_tabname('disable_beep', jid.full):
curses.beep()
if tab is self.core.tabs.current_tab:
@@ -1099,7 +1099,7 @@ class HandlerCore:
"""
When we are disconnected from remote server
"""
- if 'disconnect' in config.getlist('beep_on'):
+ if 'disconnect' in config.getstr('beep_on').split():
curses.beep()
# Stop the ping plugin. It would try to send stanza on regular basis
self.core.xmpp.plugin['xep_0199'].disable_keepalive()
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 606506b6..a2682a65 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1346,7 +1346,7 @@ class MucTab(ChatTab):
if highlighted and self.joined and not corrected:
if self.state != 'current':
self.state = 'highlight'
- beep_on = config.getlist('beep_on')
+ beep_on = config.getstr('beep_on').split()
if 'highlight' in beep_on and 'message' not in beep_on:
if not config.get_by_tabname('disable_beep', self.jid.bare):
curses.beep()