-
-
Notifications
You must be signed in to change notification settings - Fork 107
Do not fail to receive_imf call accepted/ended messages referring to non-call Message-ID #7292
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
Conversation
8339571
to
87efbb7
Compare
87efbb7
to
a123432
Compare
First two commits have a test. Third does not because it is only to prevent IMAP loop from getting stuck in a loop if there is another unexpected bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the first commit looks good to me, but to prevent more breakages like this blocker bug, probably all are fine as a temporary solution
src/imap.rs
Outdated
.await? | ||
.await | ||
{ | ||
Err(err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't happen at all normally, but only if there are I/O errors or the context itself is in some broken state. But such a fix is fine as a temporary solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed third commit that ignores errors, will merge without it.
In this case the problem was that ensure
error was bubbled up, hopefully there are no such similar problems. At least we will be able to debug them if they are not ignored.
} | ||
|
||
if mime_parser.is_call() { | ||
if is_partial_download.is_none() && mime_parser.is_call() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, instead of this i'd suggest to only parse minimum set of headers in mimeparser
for partial downloads. Otherwise it's hard (not possible in practice) to always check this is_partial_download
for all kinds of functionality we have like calls, webxdcs, etc.
a123432
to
04fa37e
Compare
… non-call Message-ID In-Reply-To may refer to non-call message as we do not control the sender. It may also happen that call message was received by older version and processed as text, in which case correct In-Reply-To appears to be referring to the text message.
Any control information from the message should only be downloaded when the message is fully downloaded to avoid processing it twice. Besides, "partial" messages may actually be full messages with an error that are only processed as partial to add a message bubble allowing to download the message later.
04fa37e
to
aa8a242
Compare
Closes #7290