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:
David Battersby
2024-09-18 22:18:46 +04:00
committed by GitHub
parent 05b8ff436c
commit 4bfe78d1e6
3 changed files with 11 additions and 11 deletions

View File

@ -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
)