Repository navigation
[stable5.13] fix(ui): show "Mark not spam" for unflagged junk messages - #14330
Open
backportbot[bot] wants to merge 2 commits into
Open
backportbot[bot] wants to merge 2 commits into
backportbot[bot] wants to merge 2 commits into
Conversation
Messages delivered to the Junk folder usually have no $junk keyword. The UI offered "Mark as spam" for them and only set $junk, so the message stayed in the folder and users had to click again to get "Mark not spam". Junk state is now derived in one store method, isEnvelopeJunk: $junk always counts, and an unflagged message in a junk folder (the account's junk mailbox or a folder with the junk special use) counts as junk unless it has $notjunk. The row and thread menus, the junk icons, the bulk selection, and the toggle and move actions use it. The "Mark as spam" quick action stays one-way: it skips messages that are already junk and never moves a message back to the inbox. The normal menu toggle still works in both directions. Not changed: the $Junk/$NotJunk keyword names (#13815), the order of the flag updates in setFlags, and the $notjunk flag on the copy that MoveJunkListener creates in INBOX. A message that keeps $notjunk inside the Junk folder still shows "Mark as spam". Fixes #11168 Assisted-by: ClaudeCode:claude-sonnet-5-5 Assisted-by: ClaudeCode:claude-opus-5-5 Assisted-by: ClaudeCode:claude-haiku-5-5 Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com> [skip ci]
test: add Vue 2 tests for junk state in envelope components Assisted-by: ClaudeCode:claude-sonnet-5-5 Assisted-by: ClaudeCode:claude-haiku-5-5 Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
ChristophWurst
marked this pull request as ready for review
November 26, 2026 11:21
DerDreschner
approved these changes
Nov 26, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #14324 to stable5.13.
The production change is identical to main. The tests are ported to the Vue 2 test setup of this branch, and I added tests for
Envelope.vuethat the automatic backport did not carry over.Screenshots
stable5.13 on Nextcloud 35, message in the Junk folder without a
$junkkeyword.Testing
Unit tests for the junk method, menus, icons and quick action pass, and fail again with the old production code. Checked by hand on a Nextcloud 35 instance with a Dovecot Junk folder: the row menu shows "Mark not spam", clicking it moves the message to the inbox, and the "Mark as spam" quick action stays one-way. Not tested: list layout, a message that keeps
$notjunkin Junk.Assisted by ClaudeCode:claude-sonnet-5-5, ClaudeCode:claude-opus-5-5, ClaudeCode:claude-haiku-5-5