Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imap: synchronize a fully fetched message w/ local db #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbinet
Copy link

@sbinet sbinet commented Dec 8, 2020

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 #112.

@emersion
Copy link
Owner

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
Copy link
Owner

emersion commented Jan 6, 2021

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

@emersion
Copy link
Owner

emersion commented Jan 6, 2021

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?

@sbinet
Copy link
Author

sbinet commented Jan 8, 2021

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.

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#112.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

text/plain being lost
2 participants