mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Prioritize full name when display_name_on_posts active (#16078)
See: https://meta.discourse.org/t/display-full-name-not-username-when-attributing-quote-or-reply/203533?u=isaacjanzen for context The initial release [broke quoting](https://meta.discourse.org/t/quoting-broken-when-name-matches-username/217633?u=isaacjanzen) but we now pass the username when ``` siteSettings.display_name_on_posts && !siteSettings.prioritize_username_in_ux && post.name ``` as well as the full name to guarantee that we are not getting any mismatches when querying for user / avatar. eg. ``` [quote="Isaac Janzen, post:3, topic:7, full:true, username:isaac.janzen"] bing bong [/quote] ```
This commit is contained in:
@@ -257,6 +257,7 @@ class PostSerializer < BasicPostSerializer
|
||||
def reply_to_user
|
||||
{
|
||||
username: object.reply_to_user.username,
|
||||
name: object.reply_to_user.name,
|
||||
avatar_template: object.reply_to_user.avatar_template
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user