Repository navigation
fix(ui): save the attachment of its own message in a thread - #14007
Open
dillardblom wants to merge 1 commit into
Open
dillardblom wants to merge 1 commit into
dillardblom wants to merge 1 commit into
Conversation
"Save to Files" on a single attachment used the message id from the route, which in a thread is the selected message, not necessarily the message the attachment belongs to. It then saved the attachment with the same id of the selected message, for example an embedded message instead of a PDF. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
dillardblom
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
November 1, 2026 23:33
dillardblom
added a commit
to dillardblom/nextcloud-mail
that referenced
this pull request
Nov 1, 2026
Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
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.
Summary
"Save to Files" on a single attachment saved the wrong file when the attachment belongs to another message of the open thread.
MessageAttachmenttook the message id from the route ($route.params.threadId), which is the selected message of the thread, and combined it with its own attachment id. Attachment ids are MIME part numbers, so they repeat across messages: the selected message's part with the same number was saved instead.MessageAttachmentsnow passes the id of the message the attachment belongs to (envelope.databaseId, as "Save all" and "Download Zip" already do) andsaveToClouduses it.How to reproduce
.eml). Both attachments are part2.…/thread/<id of message 2>.Before:
Embedded message.emlis saved instead of the PDF. After: the PDF is saved.Reproduced on 5.12.6; the same code is on
mainandstable5.13. Onstable5.12, "Save all" also uses the route id; that part is already fixed onmainandstable5.13.Test plan
MessageAttachment.vue.spec.js: saving uses the attachment's own message id, not the route's. Fails without the fix, passes with it.POST /api/messages/<message 2>/attachment/2) saves the.eml; with the attachment's own message id it saves the PDF./backport to stable5.13
/backport to stable5.12