Enable custom emojis in profiles (notes, field values, display names) (#7374)
Follow-up to #6124
This commit is contained in:
parent
bd10a7e480
commit
61a9018607
17 changed files with 43 additions and 27 deletions
|
@ -398,7 +398,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def emojis
|
||||
@emojis ||= CustomEmoji.from_text(note, domain)
|
||||
@emojis ||= CustomEmoji.from_text(emojifiable_text, domain)
|
||||
end
|
||||
|
||||
before_create :generate_keys
|
||||
|
@ -425,4 +425,8 @@ class Account < ApplicationRecord
|
|||
|
||||
self.domain = TagManager.instance.normalize_domain(domain)
|
||||
end
|
||||
|
||||
def emojifiable_text
|
||||
[note, display_name, fields.map(&:value)].join(' ')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue