ActivityPub::CollectionPresenter.new(
id: account_outbox_url(@account),
type: :ordered,
- current: account_outbox_url(@account),
size: @account.statuses_count,
items: @statuses
)
ActivityPub::CollectionPresenter.new(
id: account_followers_url(@account),
type: :ordered,
- current: account_followers_url(@account),
size: @account.followers_count,
items: @follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.account) }
)
ActivityPub::CollectionPresenter.new(
id: account_following_index_url(@account),
type: :ordered,
- current: account_following_index_url(@account),
size: @account.following_count,
items: @follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.target_account) }
)
ActivityPub::CollectionPresenter.new(
id: tag_url(@tag),
type: :ordered,
- current: tag_url(@tag),
size: @tag.statuses.count,
items: @statuses.map { |s| ActivityPub::TagManager.instance.uri_for(s) }
)
# frozen_string_literal: true
class ActivityPub::CollectionPresenter < ActiveModelSerializers::Model
- attributes :id, :type, :current, :size, :items
+ attributes :id, :type, :size, :items
end
super
end
- attributes :id, :type, :total_items,
- :current
+ attributes :id, :type, :total_items
has_many :items, key: :ordered_items
class ActivityPub::NoteSerializer < ActiveModel::Serializer
attributes :id, :type, :summary, :content,
:in_reply_to, :published, :url,
- :actor, :to, :cc, :sensitive
+ :attributed_to, :to, :cc, :sensitive
has_many :media_attachments, key: :attachment
has_many :virtual_tags, key: :tag
ActivityPub::TagManager.instance.url_for(object)
end
- def actor
+ def attributed_to
ActivityPub::TagManager.instance.uri_for(object.account)
end