add chest floof to monsterfork api & outgoing federation
parent
f083ab1a27
commit
9447566b8e
|
@ -28,6 +28,10 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
|
|||
'mp' => 'https://monsterpit.net/#',
|
||||
'trans' => 'mp:trans',
|
||||
},
|
||||
chest: {
|
||||
'mp' => 'https://monsterpit.net/#',
|
||||
'chest' => 'mp:chest',
|
||||
},
|
||||
adult_content: {
|
||||
'mp' => 'https://monsterpit.net/ns#',
|
||||
'adultContent' => 'mp:adultContent'
|
||||
|
|
|
@ -7,14 +7,16 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
|||
|
||||
context_extensions :manually_approves_followers, :featured, :also_known_as,
|
||||
:moved_to, :property_value, :hashtag, :emoji,
|
||||
:adult_content, :gently, :kobold, :froze, :big, :trans
|
||||
:adult_content, :gently, :kobold, :froze, :big, :trans,
|
||||
:chest
|
||||
|
||||
attributes :id, :type, :following, :followers,
|
||||
:inbox, :outbox, :featured,
|
||||
:preferred_username, :name, :summary,
|
||||
:url, :manually_approves_followers,
|
||||
:gently, :kobold, :adult_content,
|
||||
:froze, :tails_never_fail, :trans
|
||||
:froze, :tails_never_fail, :trans,
|
||||
:chest
|
||||
|
||||
has_one :public_key, serializer: ActivityPub::PublicKeySerializer
|
||||
|
||||
|
@ -45,6 +47,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
|||
'rights'
|
||||
end
|
||||
|
||||
def chest
|
||||
'floof'
|
||||
end
|
||||
|
||||
def id
|
||||
account_url(object)
|
||||
end
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
||||
context_extensions :conversation, :sensitive, :big,
|
||||
:hashtag, :emoji, :focal_point, :blurhash,
|
||||
:reject_replies, :trans
|
||||
:reject_replies, :trans, :chest
|
||||
|
||||
attributes :id, :type, :summary,
|
||||
:in_reply_to, :published, :updated, :url,
|
||||
:attributed_to, :to, :cc, :sensitive,
|
||||
:conversation, :source, :tails_never_fail,
|
||||
:reject_replies, :trans
|
||||
:reject_replies, :trans, :chest
|
||||
|
||||
attribute :content
|
||||
attribute :content_map, if: :language?
|
||||
|
@ -29,6 +29,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
'rights'
|
||||
end
|
||||
|
||||
def chest
|
||||
'floof'
|
||||
end
|
||||
|
||||
def id
|
||||
raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only?
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
|
|
|
@ -7,7 +7,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
:updated_at, :note, :url, :avatar, :avatar_static, :header,
|
||||
:header_static, :followers_count, :following_count, :statuses_count,
|
||||
:replies, :adult_content, :gently, :kobold, :role, :froze, :identity,
|
||||
:limited, :signature, :trans
|
||||
:limited, :signature, :trans, :chest
|
||||
|
||||
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
|
||||
has_many :emojis, serializer: REST::CustomEmojiSerializer
|
||||
|
@ -26,6 +26,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
'rights'
|
||||
end
|
||||
|
||||
def chest
|
||||
'floof'
|
||||
end
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
|
|
|
@ -6,7 +6,8 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
attributes :id, :created_at, :updated_at, :in_reply_to_id,
|
||||
:in_reply_to_account_id, :sensitive, :spoiler_text, :visibility,
|
||||
:language, :uri, :url, :replies_count, :reblogs_count,
|
||||
:favourites_count, :network, :curated, :reject_replies, :trans
|
||||
:favourites_count, :network, :curated, :reject_replies, :trans,
|
||||
:chest
|
||||
|
||||
attribute :favourited, if: :current_user?
|
||||
attribute :reblogged, if: :current_user?
|
||||
|
@ -38,6 +39,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
'rights'
|
||||
end
|
||||
|
||||
def chest
|
||||
'floof'
|
||||
end
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue