Skip to content

Adding a new transport and making it primary can lead to missing messages on second device #7843

@Hocuri

Description

@Hocuri

Steps to reproduce:

  • add a new relay on one device, and set it as default, while the other device is offline
  • Send a message to a contact, and get an answer
  • -> When the other device gets online, it won't download any of the messages that arrived in the meantime

The problem is that the second transport doesn't fetch existing messages.

Possible solutions are:

  1. Always fetch all messages when adding a transport.
    • Pro: Simple and easy
    • Con: If there are a lot of messages on the server already, then all of them will be downloaded after logging in, potentially wasting a lot of mobile data. This would be mostly fine, though, because we don't recommend using existing accounts.
  2. The first device sends uid_next in the Transports sync message so that other devices fetch the same set of messages. Not as simple as the first solution, but probably not too complex.
  3. Do nothing code-wise, maybe advise users not to immediately switch transports

Iff solution 2. doesn't turn out to be more complex than expected, I would prefer it.

cc @link2xt @iequidoo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions