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.

'$junk' => ($this->getFlagJunk() === true),
'$notjunk' => ($this->getFlagNotjunk() === true),
'mdnsent' => ($this->getFlagMdnsent() === true),
'$mdnsent' => ($this->getFlagMdnsent() === true),
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change it there, we should also change for consistency:

mdnSent() {
return this.message.flags.mdnsent
},

'mdnsent' => in_array(Horde_Imap_Client::FLAG_MDNSENT, $this->flags, true),

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