deltachat / deltachat-core

Delta.Chat C-Library with e2e chat-over-email functionality & Python bindings
https://c.delta.chat
Other
304 stars 26 forks source link

improve multi-device syncing #644

Open r10s opened 5 years ago

r10s commented 5 years ago

basic multi-device syncing is already available, eg. incoming messages appear on all devices as well as outgoing messages. also new chats are created on all devices.

however, this syncing could still be improved, if possible, this could include:

testbird commented 5 years ago

The first syncing item, the "email inbox" (contact requests) will likely need a default limit, to sync only the last maybe only 100? emails, in order to prevent downloading multi-GBs of email histories to the local devices.

The scanning for email-approved known contacts, though, may still go through all messages (once).

r10s commented 5 years ago

the "contact requests" does not download or scan old mail. only new, incoming mails are shown. there should be a maximum of messages retained on the device sooner or laster, however, this is another issue :)

testbird commented 5 years ago

I see that currently only new messages are downloaded. But not sure about the target of this issue then, if not also enabling downloading of old messages.

I think downloading of old messages becomes possible naturally, and could be enabled, once above syncing items are there (i.e. devices deleting messages from the server, and acting on deletes seen on the server).

From "multi-device syncing" I'd expect to configure an additional device for an account and get the chat histories to start with on the new device (the chat messages that are on the IMAP server).

IMHO talking about "multi-device syncing of messages", kind of implies that a new device downloads old messages in order to sync up to the current state, otherwise the devices would merely fetch (new) messages.

r10s commented 5 years ago

the main-goal of this issue is not to download old messages but to keep the settings mentioned in the first post in sync.

testbird commented 5 years ago

Ok, nevermind, downloading old messages would requires all of the above anyway.

As mentioned in the forum, for the incoming meta-data messages (receipts etc.), syncing by using a 1) "first see raw message, 1) update more suitable server representation, if still pending (e.g. seen flag on sent), 1) first to delete received raw message"

approach may not only solve the syncing and storage waste, but problems like cluttering.