Merge commit '4dc21d7afdb485402555908bc72d071f8b25ec36' into glitch-soc/merge-upstream

Conflicts:
- `config/settings.yml`:
  Upstream replaced a setting with 4 new ones, while glitch-soc had modified
  the default value of that setting.
  Removed the old setting and added the new settings, but with defaults
  matching glitch-soc's previous behavior.
This commit is contained in:
Claire
2025-10-06 19:12:25 +02:00
105 changed files with 692 additions and 423 deletions

View File

@@ -2,6 +2,7 @@
class Api::V1::Timelines::PublicController < Api::V1::Timelines::BaseController
before_action -> { authorize_if_got_token! :read, :'read:statuses' }
before_action :require_user!, if: :require_auth?
PERMITTED_PARAMS = %i(local remote limit only_media allow_local_only).freeze
@@ -13,6 +14,16 @@ class Api::V1::Timelines::PublicController < Api::V1::Timelines::BaseController
private
def require_auth?
if truthy_param?(:local)
Setting.local_live_feed_access != 'public'
elsif truthy_param?(:remote)
Setting.remote_live_feed_access != 'public'
else
Setting.local_live_feed_access != 'public' || Setting.remote_live_feed_access != 'public'
end
end
def load_statuses
preloaded_public_statuses_page
end