feat: Add route to open messages via Message-ID#12632
Open
SoleroTG wants to merge 2 commits intonextcloud:mainfrom
Open
feat: Add route to open messages via Message-ID#12632SoleroTG wants to merge 2 commits intonextcloud:mainfrom
SoleroTG wants to merge 2 commits intonextcloud:mainfrom
Conversation
Signed-off-by: SoleroTG <github-29h@solero.quietmail.eu>
Signed-off-by: SoleroTG <github-29h@solero.quietmail.eu>
4366c3a to
a38f75a
Compare
kesselb
reviewed
Mar 30, 2026
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
Contributor
There was a problem hiding this comment.
Suggested change
| * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | |
| * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors |
Comment on lines
+33
to
+38
| MailAccountMapper $mailAccountMapper, | ||
| AccountService $accountService, | ||
| MessageMapper $messageMapper, | ||
| IURLGenerator $urlGenerator, | ||
| IUserSession $userSession, | ||
| LoggerInterface $logger |
Contributor
There was a problem hiding this comment.
Suggested change
| MailAccountMapper $mailAccountMapper, | |
| AccountService $accountService, | |
| MessageMapper $messageMapper, | |
| IURLGenerator $urlGenerator, | |
| IUserSession $userSession, | |
| LoggerInterface $logger | |
| private MailAccountMapper $mailAccountMapper, | |
| private AccountService $accountService, | |
| private MessageMapper $messageMapper, | |
| private IURLGenerator $urlGenerator, | |
| private IUserSession $userSession, | |
| private LoggerInterface $logger |
Contributor
There was a problem hiding this comment.
Adding private/protected/public in a class constructor = shortcut to create a property with the given name and assign the value to it.
Comment on lines
+23
to
+28
| private MailAccountMapper $mailAccountMapper; | ||
| private AccountService $accountService; | ||
| private MessageMapper $messageMapper; | ||
| private IURLGenerator $urlGenerator; | ||
| private IUserSession $userSession; | ||
| private LoggerInterface $logger; |
Contributor
There was a problem hiding this comment.
Suggested change
| private MailAccountMapper $mailAccountMapper; | |
| private AccountService $accountService; | |
| private MessageMapper $messageMapper; | |
| private IURLGenerator $urlGenerator; | |
| private IUserSession $userSession; | |
| private LoggerInterface $logger; |
Comment on lines
+41
to
+46
| $this->mailAccountMapper = $mailAccountMapper; | ||
| $this->accountService = $accountService; | ||
| $this->messageMapper = $messageMapper; | ||
| $this->urlGenerator = $urlGenerator; | ||
| $this->userSession = $userSession; | ||
| $this->logger = $logger; |
Contributor
There was a problem hiding this comment.
Suggested change
| $this->mailAccountMapper = $mailAccountMapper; | |
| $this->accountService = $accountService; | |
| $this->messageMapper = $messageMapper; | |
| $this->urlGenerator = $urlGenerator; | |
| $this->userSession = $userSession; | |
| $this->logger = $logger; |
| /** | ||
| * @NoAdminRequired | ||
| * @NoCSRFRequired | ||
| * @PublicPage |
Contributor
There was a problem hiding this comment.
Suggested change
| * @PublicPage |
|
|
||
| /** | ||
| * @NoAdminRequired | ||
| * @NoCSRFRequired |
Contributor
There was a problem hiding this comment.
Suggested change
| * @NoCSRFRequired |
Contributor
|
Thanks a lot for your pr, I will give it a test this week. |
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.
Related to #2269
Hi @ChristophWurst, this is the first part of the deep-linking feature.
What this PR does
This PR introduces a new frontend route
/apps/mail/open/<message-id>that allows opening a specific email directly if the Message-ID is known.The app will search for a message with the given ID across all accounts and mailboxes of the user and open it if found.
This is the foundational work for a future UI element that will allow users to copy such a link. The button for generating the link is not part of this PR and will follow in a separate one.
How to test
Message-IDof an existing email (e.g., from the email source).http://<your-nextcloud-instance>/index.php/apps/mail/open/<your-message-id>.<becomes%3C).