mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
UX: remove alias from chat direct message channel titles (#28958)
Makes usernames in Chat Direct Message channels consistent with other areas of the app by removing the alias.
This commit is contained in:
@ -50,9 +50,9 @@ module Chat
|
||||
username:
|
||||
(
|
||||
if prefers_name
|
||||
acting_user.name.presence || "@#{acting_user.username}"
|
||||
acting_user.name.presence || acting_user.username
|
||||
else
|
||||
"@#{acting_user.username}"
|
||||
acting_user.username
|
||||
end
|
||||
),
|
||||
)
|
||||
@ -65,9 +65,9 @@ module Chat
|
||||
formatted_names =
|
||||
(
|
||||
if prefers_name
|
||||
users.map { |u| u.name.presence || "@#{u.username}" }.sort_by { |name| name[1..-1] }
|
||||
users.map { |u| u.name.presence || u.username }.sort_by { |name| name[1..-1] }
|
||||
else
|
||||
users.sort_by(&:username).map { |u| "@#{u.username}" }
|
||||
users.map(&:username).sort
|
||||
end
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user