Skip to content

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?

@emersion emersion mentioned this pull request Jan 6, 2021
@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