about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb4
-rw-r--r--app/models/remote_profile.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 25e7d7436..a34b6a2d3 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -350,6 +350,10 @@ class Account < ApplicationRecord
     end
   end
 
+  def emojis
+    CustomEmoji.from_text(note, domain)
+  end
+
   before_create :generate_keys
   before_validation :normalize_domain
   before_validation :prepare_contents, if: :local?
diff --git a/app/models/remote_profile.rb b/app/models/remote_profile.rb
index 613911c57..742d2b56f 100644
--- a/app/models/remote_profile.rb
+++ b/app/models/remote_profile.rb
@@ -41,6 +41,10 @@ class RemoteProfile
     @header ||= link_href_from_xml(author, 'header')
   end
 
+  def emojis
+    @emojis ||= author.xpath('./xmlns:link[@rel="emoji"]', xmlns: OStatus::TagManager::XMLNS)
+  end
+
   def locked?
     scope == 'private'
   end