[WIP] Enable custom emoji on account pages and in the sidebar (#6124)
Federate custom emojis with accounts
This commit is contained in:
parent
f464f98fd3
commit
123a343d11
10 changed files with 158 additions and 5 deletions
|
@ -10,6 +10,8 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
|
||||
has_one :public_key, serializer: ActivityPub::PublicKeySerializer
|
||||
|
||||
has_many :virtual_tags, key: :tag
|
||||
|
||||
attribute :moved_to, if: :moved?
|
||||
|
||||
class EndpointsSerializer < ActiveModel::Serializer
|
||||
|
@ -101,7 +103,14 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
object.locked
|
||||
end
|
||||
|
||||
def virtual_tags
|
||||
object.emojis
|
||||
end
|
||||
|
||||
def moved_to
|
||||
ActivityPub::TagManager.instance.uri_for(object.moved_to_account)
|
||||
end
|
||||
|
||||
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
end
|
||||
|
||||
def note
|
||||
Formatter.instance.simplified_format(object)
|
||||
Formatter.instance.simplified_format(object, custom_emojify: true)
|
||||
end
|
||||
|
||||
def url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue