Skip to content

Conversation

@DerDreschner
Copy link
Contributor

@DerDreschner DerDreschner commented Dec 19, 2025

This is a follow-up PR from #12187 and fixes the following points that were discovered during development there:

  • Fix: Use correct flag for MDNSent throughout the code base (mdnsent -> $mdnsent - $ sign was missing). There is no case known to me where this flag is being used without the $ sign (even Thunderbird does it, I've tested that).
  • Fix: Thunderbird uses the non-standard junk flag without $ sign, which was previously shown to the user as tag. This is being fixed here.

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks :)

We'll give this a test soon (I'm looking at @kesselb 👀)

@DerDreschner DerDreschner force-pushed the fix/incorrect-mdnsent-flag branch from ce9e271 to 66965e8 Compare December 19, 2025 16:41
@kesselb
Copy link
Contributor

kesselb commented Dec 22, 2025

Thanks for your pr 👍

Please add a mapping, similar to $junk, at:

mail/lib/Db/Message.php

Lines 284 to 295 in 6de0c2a

if ($flag === Tag::LABEL_IMPORTANT) {
$this->setFlagImportant($value);
} elseif ($flag === '$junk') {
$this->setFlagJunk($value);
} elseif ($flag === '$notjunk') {
$this->setFlagNotjunk($value);
} else {
$this->setter(
$this->columnToProperty("flag_$flag"),
[$value]
);
}

It's currently using the else block, but the database column is named flag_mdnsent and thus, setting flag_$mdnsent throws an exception.

@DerDreschner DerDreschner requested a review from GretaD as a code owner December 27, 2025 13:26
@DerDreschner DerDreschner force-pushed the fix/incorrect-mdnsent-flag branch from 512f628 to e2c49f3 Compare December 27, 2025 13:27
@DerDreschner
Copy link
Contributor Author

DerDreschner commented Dec 27, 2025

It's currently using the else block, but the database column is named flag_mdnsent and thus, setting flag_$mdnsent throws an exception.

Good point! I've implemented that.

Additionally, I've added the Thunderbird junk/nonjunk flags to the database mapping when retrieving the message via IMAP. I've missed that initially. Nevermind, the setFlag function is being called by our front-end. 😄

@DerDreschner DerDreschner force-pushed the fix/incorrect-mdnsent-flag branch 2 times, most recently from c361723 to b82198b Compare December 27, 2025 13:47
@DerDreschner DerDreschner changed the title fix: Use correct flag for MDN sent and don't show junk flag used by Thunderbird as tag fix: Fix incorrect flag for MDN sent, hide junk flag used by Thunderbird and map them correctly into database Dec 27, 2025
@DerDreschner DerDreschner changed the title fix: Fix incorrect flag for MDN sent, hide junk flag used by Thunderbird and map them correctly into database fix: Fix incorrect flag for MDN sent and hide junk flag used by Thunderbird Dec 27, 2025
@DerDreschner DerDreschner force-pushed the fix/incorrect-mdnsent-flag branch from b82198b to db32f1d Compare December 27, 2025 13:54
…rbird

Signed-off-by: David Dreschner <github-2017@dreschner.net>
@DerDreschner DerDreschner force-pushed the fix/incorrect-mdnsent-flag branch from db32f1d to 2af1d92 Compare December 27, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants