Fix an issue on join when the room has no MAM support
The value of the "seconds" attribute was borked, resulting in a traceback.
This commit is contained in:
parent
1595741e7a
commit
64561bcfb6
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue