Commit b60a8286 authored by mathieui's avatar mathieui

fix: beep_on was broken with config changes

parent dafe5b9e
Pipeline #3853 passed with stages
in 7 minutes and 37 seconds
......@@ -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()
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment