From 64561bcfb61d9e6493ce8d0261f7215eae148600 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 28 May 2020 21:55:28 +0200 Subject: Fix an issue on join when the room has no MAM support The value of the "seconds" attribute was borked, resulting in a traceback. --- poezio/tabs/muctab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3