oxen-io / session-desktop

Session Desktop - Onion routing based messenger
https://getsession.org
GNU General Public License v3.0
1.44k stars 187 forks source link

[Feature] Sync of messages to new device , automatic or manual #2948

Closed yannic-m closed 9 months ago

yannic-m commented 9 months ago

Is there an existing request for feature?

What feature would you like?

Session allows the same session-id on multiple devices in parallel.

I just added a new device for an existing session-id. This id is member of several private groups. The messages of the groups do not sync even if they are only 3 weeks old. (FYI : the groups were created in the desktop-client. They were not declared "closed" in any way. They were also not added to any directories.)

The groups in question are constantly active on several other devices, so there would be a source from where the messages could be synced. For now there are only few message in these groups, no more that a few dozen.

Why are the messages not synced? Is there some time-limit for sync? (I heard 2 weeks might be a limit) Can I sync "manually" somehow?

It not already there I would like to suggest a feature "manual sync of all messages of the current group". This could include an optional a cut-off-date and/or an optional maximum number of messages to be synced. That would be useful in very large public groups.

Anything else?

Nothing else

KeeJef commented 9 months ago

Closed group messages are stored for 14 days on that groups swarm, beyond this point they are deleted from the storage servers. Which means when you restore a device from seed or link a device it will only sync back 14 days worth of message history.

yannic-m commented 9 months ago

Not sure how "Closed group" is defined in session.

Syncing a new device back a short time is fine for many discussion-groups and chats where the subjects change all the time and where no one cares what was talked about a few days ago. That would mean that session is not suitable for any long-running in-depth conversations of any kind.

Is that really so? Some groups and one-on-one-chats I am in go on for years and only make sense if the history is accessible because sometimes older subjects are picked up again and then it is important to know what was written before.

Also it makes session unreliable. With the concept of only syncing up to two weeks all kinds of inconsistencies can happen. For example if a device used in parallel is off for more than two weeks it will have holes in the history of every conversation. You won't even know how big the holes are unless your carefully record when the device was switched off.

New devices with an existing ID will always have an incomplete history. So when an older device goes offline for whatever reason then older history can get lost completely.

You cannot for example make any kind of agreement that is relevant for more than two weeks in the future if there is no guarantee that proof of this agreement is still there when someone wants to check. It may even exist on one device and not on another.

In each case you do not necessarily know that anything is missing at all and even if you do you have no way to know what exactly is missing unless you compare every history on every device for each chat and even then you cannot be sure that older messages got lost altogether.

In other words that would mean that you cannot rely on session for anything that is older than 14 days. Session's ideas of privacy are really great. So no one else can read my messages. However that does not help me if I cannot be sure that the messages are even there anymore.

KeeJef commented 9 months ago

Conversation history is stored on the device indefinitely assuming disappearing messages are not enabled, so even though messages expire from the server they remain on your device. For linked devices as long as the linked device comes online once every 14 days it will be able to sync the last 14 days of missed messages, but beyond that point it won't be able to.

Our goal is to minimize server storage use and reduce data retention, hence the 14-day deletion policy on the server. In the future, we're considering establishing direct peer-to-peer connections through Lokinet. This would allow devices to synchronize conversation backlogs older than 14 days whenever both devices are online. We'll delve deeper into this solution after integrating Lokinet with Session.

yannic-m commented 9 months ago

Thank you. For now this question can be closed. I will keep watching for developments :-)