diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 4 | ||||
-rw-r--r-- | app/models/remote_profile.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 95ecc3c1c..4b73f1fa3 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -352,6 +352,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 |