feat: ignore Chat-Disposition-Notification-To value - #8681
Conversation
9c5ae2c to
44270d7
Compare
44270d7 to
0d885c4
Compare
|
|
||
| /// Test that From with multiple addresses is not allowed. | ||
| #[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
| async fn test_parse_first_addr() { |
There was a problem hiding this comment.
This test is from 09c7ab1 and was testing something different back then and checking that the first address is used. I kept the test just to avoid deleting tests, but it is now testing the opposite of what it was testing originally when the test was introduced.
0d885c4 to
b2d482d
Compare
|
|
||
| if has_header_protection { | ||
| *chat_disposition_notification_to = None; | ||
| *wants_mdn = true; |
There was a problem hiding this comment.
wrong substitute, needs to be false.
Apparently we lack a test that an incoming encrypted non-mdn requesting message avoids sending a read receipt. Maybe test_outgoing_wants_mdn can just grow this case at the end, and be renamed.
There was a problem hiding this comment.
Added two tests, i think we did not have any Rust tests that disabled MDNs.
Main change is the removal of the comparison of Chat-Disposition-Notification-To to the From header for incoming messages. Removed code that was settting WantsMdn for outgoing messages is a leftover not cleaned up in ade39fe We do not actually use WantsMdn for outgoing messages.
b2d482d to
2969a81
Compare
| // just have send a message in the subject with an empty body. | ||
| // Besides, we want to show something in case our incoming-processing | ||
| // failed to properly handle an incoming message. | ||
| if self.parts.is_empty() && self.mdn_reports.is_empty() { |
There was a problem hiding this comment.
This whole branch is for really weird messages, probably the only way to construct them is to create multipart/mixed without any parts, immediately starting with a trailer. I tweaked the code inside to match WantsMdn documentation, but such messages likely should just be assigned to trash with the simplest possible tombstone.
Main change is the removal of the comparison of Chat-Disposition-Notification-To to the From header for incoming messages.
Removed code that was settting WantsMdn for outgoing messages is a leftover not cleaned up in ade39fe We do not actually use WantsMdn for outgoing messages.