|
|
@ -3,9 +3,13 @@ |
|
|
|
class FollowingAccountsController < ApplicationController |
|
|
|
class FollowingAccountsController < ApplicationController |
|
|
|
include AccountControllerConcern |
|
|
|
include AccountControllerConcern |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before_action :set_cache_headers |
|
|
|
|
|
|
|
|
|
|
|
def index |
|
|
|
def index |
|
|
|
respond_to do |format| |
|
|
|
respond_to do |format| |
|
|
|
format.html do |
|
|
|
format.html do |
|
|
|
|
|
|
|
mark_cacheable! unless user_signed_in? |
|
|
|
|
|
|
|
|
|
|
|
next if @account.user_hides_network? |
|
|
|
next if @account.user_hides_network? |
|
|
|
|
|
|
|
|
|
|
|
follows |
|
|
|
follows |
|
|
@ -15,6 +19,11 @@ class FollowingAccountsController < ApplicationController |
|
|
|
format.json do |
|
|
|
format.json do |
|
|
|
raise Mastodon::NotPermittedError if params[:page].present? && @account.user_hides_network? |
|
|
|
raise Mastodon::NotPermittedError if params[:page].present? && @account.user_hides_network? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params[:page].blank? |
|
|
|
|
|
|
|
skip_session! |
|
|
|
|
|
|
|
expires_in 3.minutes, public: true |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
render json: collection_presenter, |
|
|
|
render json: collection_presenter, |
|
|
|
serializer: ActivityPub::CollectionSerializer, |
|
|
|
serializer: ActivityPub::CollectionSerializer, |
|
|
|
adapter: ActivityPub::Adapter, |
|
|
|
adapter: ActivityPub::Adapter, |
|
|
|