Enable custom emojis in profiles (notes, field values, display names) (#7374)

Follow-up to #6124
This commit is contained in:
Eugen Rochko 2018-05-06 11:48:51 +02:00 committed by GitHub
parent bd10a7e480
commit 61a9018607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 43 additions and 27 deletions

View file

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