mirukana / mirage

A fancy, customizable, keyboard-operable Qt/QML & Python Matrix chat client for encrypted and decentralized communication.
GNU Lesser General Public License v3.0
412 stars 40 forks source link

after wake-up from suspend-to-ram messages are missingd #145

Open chri2 opened 3 years ago

chri2 commented 3 years ago

Description

When I suspend my notebook to ram while running mirage it is fetching some messages after wake-up, but not all.

After waking up from suspend-to-ram the message history is incomplete.

Exiting mirage and starting it again fixes the problem.

Your environment

Steps to reproduce

Expected behavior

Mirage should download all the old message after the computer it is running on woke up from suspend-to-anything

Actual behavior

Some messages are missing in message history after waking up from suspend-to-ram.

chri2 commented 3 years ago

Before suspend-to-ram

1_before_suspend

After waking up from suspend-to-ram

2_after_suspend

One page up I can see the end of history before suspend-to-ram

3_after_suspend_one_page_up

After closing mirage and starting it again:

4_after_suspend_after_restart_of_mirage

One page up one can see the differences between the history now and the history before closing and restarting mirage

5_after_suspend_after_restart_of_mirage_one_page_up-compare_to_no_3

Going further up there are more messages missing

6_after_suspend_after_restart_of_mirage_two_pages_up

mirukana commented 3 years ago

I believe this is due to matrix-nio not handling gaps in the sync (CTRL+F gaps), so when too many messages happen between two syncs (which happens when hibernating), the server doesn't return everything and we have to manually fetch the missing stuff.