mirror of
https://github.com/mastodon/mastodon.git
synced 2026-03-21 18:05:23 -05:00
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Check for relevant changes (push) Waiting to run
Chromatic / Run Chromatic (push) Blocked by required conditions
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Haml Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Historical data migration test / test (16-alpine) (push) Waiting to run
Historical data migration test / test (17-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.19.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
34 lines
687 B
Ruby
34 lines
687 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ActivityPub::AcceptFeatureRequestSerializer < ActivityPub::Serializer
|
|
include RoutingHelper
|
|
|
|
attributes :id, :type, :actor, :to, :result
|
|
|
|
has_one :virtual_object, key: :object
|
|
|
|
def id
|
|
[ActivityPub::TagManager.instance.uri_for(object.account), '#accepts/feature_requests/', object.id].join
|
|
end
|
|
|
|
def type
|
|
'Accept'
|
|
end
|
|
|
|
def actor
|
|
ActivityPub::TagManager.instance.uri_for(object.account)
|
|
end
|
|
|
|
def to
|
|
ActivityPub::TagManager.instance.uri_for(object.collection.account)
|
|
end
|
|
|
|
def virtual_object
|
|
object.activity_uri
|
|
end
|
|
|
|
def result
|
|
ap_account_feature_authorization_url(object.account_id, object)
|
|
end
|
|
end
|