diff options
-rw-r--r-- | poezio/tabs/muctab.py | 5 |
1 files changed, 4 insertions, 1 deletions
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, |