From 7d16bb379d1463471faf264bb89e24d5b8a505ca Mon Sep 17 00:00:00 2001 From: nullkal Date: Tue, 19 Sep 2017 23:37:06 +0900 Subject: Use OrderedCollectionPage to return followers/following list (#4949) --- app/presenters/activitypub/collection_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/presenters') diff --git a/app/presenters/activitypub/collection_presenter.rb b/app/presenters/activitypub/collection_presenter.rb index 631d87cd0..39657276f 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, :size, :items + attributes :id, :type, :size, :items, :part_of, :first, :next, :prev end -- cgit From ab625c57cebb1f45645b9fb0638548e1079378b1 Mon Sep 17 00:00:00 2001 From: Daigo 3 Dango Date: Sat, 23 Sep 2017 23:18:32 -1000 Subject: Compact status_ids in StatusRelationshipsPresenter (#5073) --- app/presenters/status_relationships_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/presenters') diff --git a/app/presenters/status_relationships_presenter.rb b/app/presenters/status_relationships_presenter.rb index 10b449504..bc3887a44 100644 --- a/app/presenters/status_relationships_presenter.rb +++ b/app/presenters/status_relationships_presenter.rb @@ -11,7 +11,7 @@ class StatusRelationshipsPresenter @pins_map = {} else statuses = statuses.compact - status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq + status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq.compact conversation_ids = statuses.map(&:conversation_id).compact.uniq pinnable_status_ids = statuses.map(&:proper).select { |s| s.account_id == current_account_id && %w(public unlisted).include?(s.visibility) }.map(&:id) -- cgit