hydroxide icon indicating copy to clipboard operation
hydroxide copied to clipboard

imap: synchronize a fully fetched message w/ local db

Open sbinet opened this issue 5 years ago • 4 comments

The messages list is first retrieved from Proton via the /messages call. A JSON representation of each of these messages is saved in a local db. However, the retrieved JSON description doesn't include the MIMEType field which is left empty.

This CL fixes this by always sync'ing the local db with the full message description as soon as it's retrieved from Proton.

Fixes emersion/hydroxide#112.

sbinet avatar Dec 08 '20 14:12 sbinet

Hm. I'm worried this might significantly slow down IMAP responses, but I don't know if there's a better way to fix it.

emersion avatar Dec 14 '20 11:12 emersion

Ah, this doesn't actually fetch the messages more often, this just stores more info in the DB.

emersion avatar Jan 06 '21 10:01 emersion

Hm. Does this rely on the order in which the client performs requests? e.g. if the client doesn't trigger fetchBodySection and only fetches the BODYSTRUCTURE, this wouldn't work?

emersion avatar Jan 06 '21 10:01 emersion

e.g. if the client doesn't trigger fetchBodySection and only fetches the BODYSTRUCTURE, this wouldn't work?

not sure I have the required know-how to be able to answer that question. sorry.

sbinet avatar Jan 08 '21 10:01 sbinet