]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Sun, 8 Nov 2020 13:20:35 +0000 (14:20 +0100)
committerThibaut Girka <thib@sitedethib.com>
Sun, 8 Nov 2020 13:20:35 +0000 (14:20 +0100)
Conflicts:
- `app/controllers/follower_accounts_controller.rb`:
  Conflict due to upstream changing suspension logic while
  glitch-soc has an extra option to hide followers count.
  Ported upstream changes.

1  2 
app/controllers/accounts_controller.rb
app/controllers/follower_accounts_controller.rb
app/controllers/following_accounts_controller.rb
app/lib/activitypub/adapter.rb
app/models/account.rb
db/schema.rb

index 5ffbdae79d922b18985951f2fd2c48bd8d9bd62d,ff4df2adfca9c1ad9fc8cd6f96f07b0a7e42084c..18b281325bd90ce2b7e92a4fcb1fd61b02086b55
@@@ -53,17 -52,24 +53,25 @@@ class FollowerAccountsController < Appl
      account_followers_url(@account, page: page) unless page.nil?
    end
  
+   def next_page_url
+     page_url(follows.next_page) if follows.respond_to?(:next_page)
+   end
+   def prev_page_url
+     page_url(follows.prev_page) if follows.respond_to?(:prev_page)
+   end
    def collection_presenter
 +    options = { type: :ordered }
 +    options[:size] = @account.followers_count unless Setting.hide_followers_count || @account.user&.setting_hide_followers_count
      if page_requested?
        ActivityPub::CollectionPresenter.new(
          id: account_followers_url(@account, page: params.fetch(:page, 1)),
 -        type: :ordered,
 -        size: @account.followers_count,
          items: follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.account) },
          part_of: account_followers_url(@account),
-         next: page_url(follows.next_page),
-         prev: page_url(follows.prev_page),
+         next: next_page_url,
 -        prev: prev_page_url
++        prev: prev_page_url,
 +        **options
        )
      else
        ActivityPub::CollectionPresenter.new(
Simple merge
Simple merge
diff --cc db/schema.rb
Simple merge