diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-10-02 17:33:37 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-10-02 18:46:22 +0200 |
commit | 221580a3afb62b8da047b4feddbb58261ca07fbc (patch) | |
tree | bb070ba3e04a4cea5a7f55257ebe3cf71b2df280 /lib | |
parent | 9d7c323abdda66423751f3a25faf960674af8a49 (diff) | |
parent | c55219efa811b3c6347774bec1b174d325e5f300 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/home_controller.rb`: Upstream made it so `/web` is available to non-logged-in users and `/` redirects to `/web` instead of `/about`. Kept our version since glitch-soc's WebUI doesn't have what's needed yet and I think /about is still a much better landing page anyway. - `app/models/form/admin_settings.rb`: Upstream added new settings, and glitch-soc had an extra setting. Not really a conflict. Added upstream's new settings. - `app/serializers/initial_state_serializer.rb`: Upstream added a new `server` initial state object. Not really a conflict. Merged upstream's changes. - `app/views/admin/settings/edit.html.haml`: Upstream added new settings. Not really a conflict. Merged upstream's changes. - `app/workers/scheduler/feed_cleanup_scheduler.rb`: Upstream refactored that part and removed the file. Ported our relevant changes into `app/lib/vacuum/feeds_vacuum.rb` - `config/settings.yml`: Upstream added new settings. Not a real conflict. Added upstream's new settings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exceptions.rb | 9 | ||||
-rw-r--r-- | lib/mastodon/media_cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/search_cli.rb | 2 | ||||
-rw-r--r-- | lib/tasks/mastodon.rake | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/lib/exceptions.rb b/lib/exceptions.rb index 0c677b660..3c5ba226b 100644 --- a/lib/exceptions.rb +++ b/lib/exceptions.rb @@ -25,4 +25,13 @@ module Mastodon end end end + + class PrivateNetworkAddressError < HostValidationError + attr_reader :host + + def initialize(host) + @host = host + super() + end + end end diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 4904cc5eb..bba4a1bd7 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -234,7 +234,7 @@ module Mastodon end if options[:days].present? - scope = scope.where('id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false)) + scope = scope.where('media_attachments.id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false)) end processed, aggregate = parallelize_with_progress(scope) do |media_attachment| diff --git a/lib/mastodon/search_cli.rb b/lib/mastodon/search_cli.rb index b579ebc14..b206854ab 100644 --- a/lib/mastodon/search_cli.rb +++ b/lib/mastodon/search_cli.rb @@ -30,7 +30,7 @@ module Mastodon changed since the last run. Index upgrades erase index data. Even if creating or upgrading indices is not necessary, data from the - database will be imported into the indices, unless overriden with --no-import. + database will be imported into the indices, unless overridden with --no-import. LONG_DESC def deploy if options[:concurrency] < 1 diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index d652468b3..0ccfc9f29 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -11,7 +11,7 @@ namespace :mastodon do # When the application code gets loaded, it runs `lib/mastodon/redis_configuration.rb`. # This happens before application environment configuration and sets REDIS_URL etc. # These variables are then used even when REDIS_HOST etc. are changed, so clear them - # out so they don't interfer with our new configuration. + # out so they don't interfere with our new configuration. ENV.delete('REDIS_URL') ENV.delete('CACHE_REDIS_URL') ENV.delete('SIDEKIQ_REDIS_URL') |