diff options
author | Maxime Buquet <pep@bouah.net> | 2020-05-17 21:34:50 +0200 |
---|---|---|
committer | Maxime Buquet <pep@bouah.net> | 2020-05-17 21:34:50 +0200 |
commit | 36a0281b6761371d5a42a14acc7f7081c0bf076c (patch) | |
tree | 35f39d2e623e03b1bc1d1b2e482875e2f362bbde /poezio/core/handlers.py | |
parent | 20cb8f0bef811e7b470d4be36e7467a0da7177b5 (diff) | |
parent | 551828607c7644d7af6b5889c7ffb2f28eeefee9 (diff) | |
download | poezio-36a0281b6761371d5a42a14acc7f7081c0bf076c.tar.gz poezio-36a0281b6761371d5a42a14acc7f7081c0bf076c.tar.bz2 poezio-36a0281b6761371d5a42a14acc7f7081c0bf076c.tar.xz poezio-36a0281b6761371d5a42a14acc7f7081c0bf076c.zip |
Merge branch 'fix-highlights' into 'master'
Fix highlights
See merge request poezio/poezio!102
Diffstat (limited to 'poezio/core/handlers.py')
-rw-r--r-- | poezio/core/handlers.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index 01fb6062..445d8b74 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -783,6 +783,7 @@ class HandlerCore: # Messages coming from MUC barejid (Server maintenance, IRC mode # changes from biboumi, etc.) are displayed as info messages. if message['from'].resource: + highlight = tab.message_is_highlight(body, nick_from, delayed) ui_msg = PMessage( txt=body, time=date, @@ -792,6 +793,7 @@ class HandlerCore: identifier=message['id'], jid=message['from'], user=user, + highlight=highlight, ) typ = 1 else: @@ -801,8 +803,8 @@ class HandlerCore: identifier=message['id'], ) typ = 2 - - if tab.add_message(ui_msg, typ): + tab.add_message(ui_msg, typ) + if highlight: self.core.events.trigger('highlight', message, tab) if message['from'].resource == tab.own_nick: |