Add API endpoints to view and revoke one's quoted posts (#35578)

This commit is contained in:
Claire authored and GitHub committed 2025-07-31 09:36:51 +00:00
1 parent 572a0e128d
commit 2dfdcc7dcb
10 files changed
+324

No files matched your search

@@ -0,0 +1,28 @@
# frozen_string_literal: true
class ActivityPub::DeleteQuoteAuthorizationSerializer < ActivityPub::Serializer
attributes :id, :type, :actor, :to
# TODO: change the `object` to a `QuoteAuthorization` object instead of just the URI?
attribute :virtual_object, key: :object
def id
[object.approval_uri, '#delete'].join
end
def virtual_object
object.approval_uri
end
def type
'Delete'
end
def actor
ActivityPub::TagManager.instance.uri_for(object.quoted_account)
end
def to
[ActivityPub::TagManager::COLLECTIONS[:public]]
end
end