Problem/Motivation
Outgoing private message notification emails contain placeholder markup in the thread URL, for example:
You have received a new private message. To read your message, follow this link: http://www.example.com/messages/view/38909
Steps to reproduce
In a Drupal 10 environment where privatemsg is enabled, user A sends a private message to user B. Inspect the email that is received by user B.
Expected: clean clickable URL that goes to the relevant message
Actual: http://www.example.com/messages/view/38909
Proposed resolution
Before: URL built manually; notification used hard-coded 'ru'.
After: Generate link via Url::fromRoute(...); use $member->getPreferredLangcode() for recipient language.
Why: Ensures correct route building (aliases/language) and sends notifications in the recipient's preferred language. No API changes.
Remaining tasks
None (on my side)
User interface changes
None
API changes
None
Data model changes
None
Issue fork privatemsg-3545738
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
neopoet commentedComment #4
ivnishThanks for your contribution!
Comment #6
ivnish