diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb index 6a58ccf243184c7ecc8ad93697c78ee3176261e8..30b91f37021dc7156ba88fe665053e706267bb59 100644 --- a/app/controllers/activitypub/outboxes_controller.rb +++ b/app/controllers/activitypub/outboxes_controller.rb @@ -20,7 +20,6 @@ class ActivityPub::OutboxesController < Api::BaseController ActivityPub::CollectionPresenter.new( id: account_outbox_url(@account), type: :ordered, - current: account_outbox_url(@account), size: @account.statuses_count, items: @statuses ) diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb index e58c5ad46e635bcabdc3ae328b1ebf581ded003c..5edb4d67c8a878c0d65fb6c17bb0a22ee9aeb0ca 100644 --- a/app/controllers/follower_accounts_controller.rb +++ b/app/controllers/follower_accounts_controller.rb @@ -21,7 +21,6 @@ class FollowerAccountsController < ApplicationController 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) } ) diff --git a/app/controllers/following_accounts_controller.rb b/app/controllers/following_accounts_controller.rb index 69f29cd7088cdc0d3e162a6ffd7c9f64547d6f8f..7cafe5fda50a51ad0493d19230c651936bb608b1 100644 --- a/app/controllers/following_accounts_controller.rb +++ b/app/controllers/following_accounts_controller.rb @@ -21,7 +21,6 @@ class FollowingAccountsController < ApplicationController 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) } ) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 8bcce9e13ce1b1136aeffcb1b833288385bb3e6f..2cd85e185e51d8a6fe2271eadefa1365891e222d 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -23,7 +23,6 @@ class TagsController < ApplicationController 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) } ) diff --git a/app/presenters/activitypub/collection_presenter.rb b/app/presenters/activitypub/collection_presenter.rb index 6bae2955ea5ef65bfeba8e14fc30952d8949a21a..631d87cd03c38d9e93ff0d704c6e11d652d79e91 100644 --- a/app/presenters/activitypub/collection_presenter.rb +++ b/app/presenters/activitypub/collection_presenter.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class ActivityPub::CollectionPresenter < ActiveModelSerializers::Model - attributes :id, :type, :current, :size, :items + attributes :id, :type, :size, :items end diff --git a/app/serializers/activitypub/collection_serializer.rb b/app/serializers/activitypub/collection_serializer.rb index baaba76543c4f12f437f9d1d7c0b0613e4b264ce..d01dead289e5fb153aa51d91bdcc0eaa58640499 100644 --- a/app/serializers/activitypub/collection_serializer.rb +++ b/app/serializers/activitypub/collection_serializer.rb @@ -6,8 +6,7 @@ class ActivityPub::CollectionSerializer < ActiveModel::Serializer super end - attributes :id, :type, :total_items, - :current + attributes :id, :type, :total_items has_many :items, key: :ordered_items diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index ffdc6175d4125a02308607ff11f3d484c69df352..4c13f8e596a2577ba50eb45326c4a7f952e0149f 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -3,7 +3,7 @@ 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 @@ -36,7 +36,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer ActivityPub::TagManager.instance.url_for(object) end - def actor + def attributed_to ActivityPub::TagManager.instance.uri_for(object.account) end