Commit 19386baa authored by Madhur Garg's avatar Madhur Garg

Update end date with buffer, useful for any tab which supports MAM and has messages in it.

parent afbff00c
......@@ -133,6 +133,12 @@ def mam_scroll(tab):
except:
before = None
end = datetime.now()
if isinstance(tab, tabs.MucTab) is False:
for message in text_buffer.messages:
time = message.time
if time < end:
end = time
end = end + timedelta(seconds=-1)
tzone = datetime.now().astimezone().tzinfo
end = end.replace(tzinfo=tzone).astimezone(tz=timezone.utc)
end = end.replace(tzinfo=None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment