about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-05-06 11:48:51 +0200
committerGitHub <noreply@github.com>2018-05-06 11:48:51 +0200
commit61a90186070395e133ad2f8e959bdf003a8615ca (patch)
tree49596898f7e5c72116db1d181847f5925a033c59 /app/models
parentbd10a7e48076c913a652c347b0477496be8813fa (diff)
Enable custom emojis in profiles (notes, field values, display names) (#7374)
Follow-up to #6124
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 72ba0398e..4467d1512 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -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