mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Add display_name to Web::NotificationSerializer
This commit is contained in:
parent
20b1e55f24
commit
d56ae18243
1 changed files with 5 additions and 1 deletions
|
@ -28,8 +28,12 @@ class Web::NotificationSerializer < ActiveModel::Serializer
|
|||
full_asset_url(object.from_account.avatar_static_url)
|
||||
end
|
||||
|
||||
def display_name
|
||||
object.from_account.display_name.presence || object.from_account.username
|
||||
end
|
||||
|
||||
def title
|
||||
I18n.t("notification_mailer.#{object.type}.subject", name: object.from_account.display_name.presence || object.from_account.username)
|
||||
I18n.t("notification_mailer.#{object.type}.subject", name: display_name)
|
||||
end
|
||||
|
||||
def body
|
||||
|
|
Loading…
Reference in a new issue