From 4cf4e3b7d54924759bf189d4f469c22eb6871b60 Mon Sep 17 00:00:00 2001 From: Ember Date: Sat, 29 Jun 2024 14:10:12 +1000 Subject: [PATCH] ? --- app/controllers/api/v1/timelines/public_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index 2c83738a2702c9..23fc16afa5c1e7 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -2,8 +2,8 @@ class Api::V1::Timelines::PublicController < Api::V1::Timelines::BaseController before_action :require_user!, only: [:show], if: :require_auth? - before_action :require_user!, only: [:show], if: :require_auth_local? && !truthy_param?(:local) - before_action :require_user!, only: [:show], if: :require_auth_remote? && !truthy_param?(:remote) + before_action :require_user!, only: [:show], if: :require_auth_local? + before_action :require_user!, only: [:show], if: :require_auth_remote? PERMITTED_PARAMS = %i(local remote limit only_media allow_local_only).freeze @@ -20,11 +20,11 @@ def require_auth? end def require_auth_local? - !Setting.timeline_preview_local + !Setting.timeline_preview_local && !truthy_param?(:local) end def require_auth_remote? - !Setting.timeline_preview_remote + !Setting.timeline_preview_remote && !truthy_param?(:remote) end def load_statuses