diff options
-rw-r--r-- | poezio/core/handlers.py | 1 | ||||
-rw-r--r-- | poezio/tabs/muctab.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index cad4d47e..c344ebd3 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -789,6 +789,7 @@ class HandlerCore: if not replaced: # Messages coming from MUC barejid (Server maintenance, IRC mode # changes from biboumi, etc.) are displayed as info messages. + highlight = False if message['from'].resource: highlight = tab.message_is_highlight(body, nick_from, delayed) ui_msg = PMessage( diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index ace0df99..63bf026e 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -159,7 +159,10 @@ class MucTab(ChatTab): delta = to_utc(datetime.now()) - to_utc(self.last_connection) seconds = delta.seconds + delta.days * 24 * 3600 else: - seconds = self._text_buffer.find_last_message() + last_message = self._text_buffer.find_last_message() + seconds = None + if last_message is not None: + seconds = (datetime.now() - last_message.time).seconds muc.join_groupchat( self.core, self.jid.bare, |