mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Add support for local quote stamps (#35626)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::QuoteAuthorizationSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
context_extensions :quote_authorizations
|
||||
|
||||
attributes :id, :type, :attributed_to, :interacting_object, :interaction_target
|
||||
|
||||
def id
|
||||
ActivityPub::TagManager.instance.approval_uri_for(object)
|
||||
end
|
||||
|
||||
def type
|
||||
'QuoteAuthorization'
|
||||
end
|
||||
|
||||
def attributed_to
|
||||
ActivityPub::TagManager.instance.uri_for(object.quoted_account)
|
||||
end
|
||||
|
||||
def interaction_target
|
||||
ActivityPub::TagManager.instance.uri_for(object.quoted_status)
|
||||
end
|
||||
|
||||
def interacting_object
|
||||
ActivityPub::TagManager.instance.uri_for(object.status)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user