fix: Tombstone MDN before sending it (#8252)#8257
Conversation
WofWca
left a comment
There was a problem hiding this comment.
Sounds like this should work but I'm probably not the right person to ask.
IDK about introducing different behavior for tests though, it doesn't seem like something we often do at least. At least some comments about could be useful? But maybe it's obvious to someone who knows what they're reading.
The |
This is already discussed in #8008, we indeed don't want to have conditional compilation or hooks just for tests. Just checking that MDN is in |
| SendResult::Success => { | ||
| if !recipients.is_empty() { | ||
| info!(context, "Successfully sent MDN for {rfc724_mid}."); | ||
| message::insert_tombstone(context, &rendered_msg.rfc724_mid).await?; |
There was a problem hiding this comment.
This is the actual fix and it is likely good as long as other code is not changed just for testing.
44261e2 to
842d1f4
Compare
Otherwise, when it appears on IMAP, it will mark chat messages as seen/noticed even if markfresh_chat() is called meanwhile.
842d1f4 to
48b7697
Compare
|
For the record, i've removed conditional compilation, but just in case if changes still look complex, i'm going to replace the changes to |
Otherwise, when it appears on IMAP, it will mark chat messages as seen/noticed even if
markfresh_chat() is called meanwhile.
test: Add function to queue MDN into smtpis extracted from #8008 , better to be reviewed there.Fix #8252