summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-05-28 22:01:32 +0200
committerMaxime Buquet <pep@bouah.net>2020-05-28 22:01:32 +0200
commit502d79e763b29cf1a7327f9054ebbc436117a26f (patch)
treee108c16b6ac554cfd7ae7eda34d916d09ee0e322
parentf670e3ce3b8d69a9fde71301e156f936aaee6fd8 (diff)
parent64561bcfb61d9e6493ce8d0261f7215eae148600 (diff)
downloadpoezio-502d79e763b29cf1a7327f9054ebbc436117a26f.tar.gz
poezio-502d79e763b29cf1a7327f9054ebbc436117a26f.tar.bz2
poezio-502d79e763b29cf1a7327f9054ebbc436117a26f.tar.xz
poezio-502d79e763b29cf1a7327f9054ebbc436117a26f.zip
Merge branch 'fix-issue-history-no-mam' into 'master'
Fix an issue on join when the room has no MAM support See merge request poezio/poezio!136
-rw-r--r--poezio/tabs/muctab.py5
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,