From 7075998b87d864b623cedad7af2861a9fa5f8d53 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 14 Nov 2018 12:09:32 +1030 Subject: [PATCH] Use canonical username for user profile link. fixes flarum/core#1265 --- extensions/mentions/src/Listener/FormatUserMentions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/mentions/src/Listener/FormatUserMentions.php b/extensions/mentions/src/Listener/FormatUserMentions.php index 653054f66..d56ca4121 100755 --- a/extensions/mentions/src/Listener/FormatUserMentions.php +++ b/extensions/mentions/src/Listener/FormatUserMentions.php @@ -75,6 +75,7 @@ class FormatUserMentions $event->xml = Utils::replaceAttributes($event->xml, 'USERMENTION', function ($attributes) use ($post) { $user = $post->mentionsUsers->find($attributes['id']); if ($user) { + $attributes['username'] = $user->username; $attributes['displayname'] = $user->display_name; }