Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Highlight on mention of own real JID in Groupchat
· 6f2fbde6
Philipp Hörist
authored
Oct 07, 2017
Fixes
#8752
6f2fbde6
Fix broken highlight sound in Groupchat
· 2a2d4477
Philipp Hörist
authored
Oct 07, 2017
tim is epoch, time.localtime() a struct_time
2a2d4477
Hide whitespace changes
Inline
Side-by-side
gajim/groupchat_control.py
View file @
2a2d4477
...
...
@@ -1290,7 +1290,7 @@ def highlighting_for_message(self, text, tim):
sound = 'received'
# Is it a history message? Don't want sound-floods when we join.
if tim != time.localtime():
if tim !=
time.mktime(
time.localtime()
)
:
sound = None
return (highlight, sound)
...
...
@@ -1320,6 +1320,8 @@ def needs_visual_notification(self, text):
"""
special_words = app.config.get('muc_highlight_words').split(';')
special_words.append(self.nick)
con = app.connections[self.account]
special_words.append(con.get_own_jid().getStripped())
# Strip empties: ''.split(';') == [''] and would highlight everything.
# Also lowercase everything for case insensitive compare.
special_words = [word.lower() for word in special_words if word]
...
...