[WIP] Enable custom emoji on account pages and in the sidebar (#6124)
Federate custom emojis with accounts
This commit is contained in:
committed by
Eugen Rochko
parent
f464f98fd3
commit
123a343d11
@ -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?
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user