Skip to content

receive_imf_inner() shouldn't fail for partial downloads #7321

@iequidoo

Description

@iequidoo

This is a follow-up to #7290 . Currently receive_imf has many is_partial_download.is_{none,some}() checks and apparently there are places where such checks are forgotten (and it's not really achievable to ensure that this will never happen in the future), so sometimes logic aimed for processing fully downloaded messages is executed for partial downloads, this may lead to inconsistencies and if a logic error happens for a partial download, it can't be added to the chat and the IMAP loop will stuck, see f94b2c3. A possible solution is to only parse some minimum set of headers in mimeparser for partial downloads, like Message-ID, Chat-Group-Id so that a partial download can be added to the chat but nothing else happens, and remove is_partial_download checks from receive_imf where possible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions