From 9e164c532f21df3eb0a517e560b7fc8b58737c74 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 6 Feb 2025 10:38:32 +0100 Subject: [PATCH 01/12] Add `--skip-filled-timeline` option to `tootctl feed build` to skip half-filled feeds (#33844) --- app/lib/feed_manager.rb | 9 +++++++++ app/services/precompute_feed_service.rb | 14 +++++++++++--- lib/mastodon/cli/feeds.rb | 8 ++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index b6b5fd729d..9c5c306e96 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -32,6 +32,15 @@ class FeedManager "feed:#{type}:#{id}:#{subtype}" end + # The number of items in the given timeline + # @param [Symbol] type + # @param [Integer] id + # @param [Symbol] subtype + # @return [Integer] + def timeline_size(type, id, subtype = nil) + redis.zcard(key(type, id, subtype)) + end + # The filter result of the status to a particular feed # @param [Symbol] timeline_type # @param [Status] status diff --git a/app/services/precompute_feed_service.rb b/app/services/precompute_feed_service.rb index 86aad50983..a591c90913 100644 --- a/app/services/precompute_feed_service.rb +++ b/app/services/precompute_feed_service.rb @@ -3,13 +3,21 @@ class PrecomputeFeedService < BaseService include Redisable - def call(account) - FeedManager.instance.populate_home(account) + def call(account, skip_filled_timelines: false) + @skip_filled_timelines = skip_filled_timelines + + FeedManager.instance.populate_home(account) unless skip_timeline?(:home, account.id) account.owned_lists.each do |list| - FeedManager.instance.populate_list(list) + FeedManager.instance.populate_list(list) unless skip_timeline?(:list, list.id) end ensure redis.del("account:#{account.id}:regeneration") end + + private + + def skip_timeline?(type, id) + @skip_filled_timelines && FeedManager.instance.timeline_size(type, id) * 2 > FeedManager::MAX_ITEMS + end end diff --git a/lib/mastodon/cli/feeds.rb b/lib/mastodon/cli/feeds.rb index 3879751d0e..324e493e28 100644 --- a/lib/mastodon/cli/feeds.rb +++ b/lib/mastodon/cli/feeds.rb @@ -11,17 +11,21 @@ module Mastodon::CLI option :concurrency, type: :numeric, default: 5, aliases: [:c] option :verbose, type: :boolean, aliases: [:v] option :dry_run, type: :boolean, default: false + option :skip_filled_timelines desc 'build [USERNAME]', 'Build home and list feeds for one or all users' long_desc <<-LONG_DESC Build home and list feeds that are stored in Redis from the database. + With the --skip-filled-timelines, timelines which contain more than half + the maximum number of posts will be skipped. + With the --all option, all active users will be processed. Otherwise, a single user specified by USERNAME. LONG_DESC def build(username = nil) if options[:all] || username.nil? processed, = parallelize_with_progress(active_user_accounts) do |account| - PrecomputeFeedService.new.call(account) unless dry_run? + PrecomputeFeedService.new.call(account, skip_filled_timelines: options[:skip_filled_timelines]) unless dry_run? end say("Regenerated feeds for #{processed} accounts #{dry_run_mode_suffix}", :green, true) @@ -30,7 +34,7 @@ module Mastodon::CLI fail_with_message 'No such account' if account.nil? - PrecomputeFeedService.new.call(account) unless dry_run? + PrecomputeFeedService.new.call(account, skip_filled_timelines: options[:skip_filled_timelines]) unless dry_run? say("OK #{dry_run_mode_suffix}", :green, true) else From 9692ffb911d6a56bb98376783599bc611b6dff46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:53:56 +0100 Subject: [PATCH 02/12] New Crowdin Translations (automated) (#33847) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/eo.json | 12 ++++++------ app/javascript/mastodon/locales/sk.json | 1 + app/javascript/mastodon/locales/uk.json | 1 + config/locales/doorkeeper.eo.yml | 2 +- config/locales/eo.yml | 4 ++-- config/locales/simple_form.eo.yml | 10 +++++----- config/locales/simple_form.uk.yml | 1 + config/locales/sk.yml | 2 ++ 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json index 7da4102920..c1dad2eacf 100644 --- a/app/javascript/mastodon/locales/eo.json +++ b/app/javascript/mastodon/locales/eo.json @@ -45,7 +45,7 @@ "account.languages": "Ŝanĝi la abonitajn lingvojn", "account.link_verified_on": "Propreco de tiu ligilo estis konfirmita je {date}", "account.locked_info": "Tiu konto estas privatigita. La posedanto mane akceptas tiun, kiu povas sekvi rin.", - "account.media": "Plurmedio", + "account.media": "Aŭdovidaĵoj", "account.mention": "Mencii @{name}", "account.moved_to": "{name} indikis, ke ria nova konto estas nun:", "account.mute": "Silentigi @{name}", @@ -172,7 +172,7 @@ "column_search.cancel": "Nuligi", "column_subheading.settings": "Agordoj", "community.column_settings.local_only": "Nur loka", - "community.column_settings.media_only": "Nur plurmedio", + "community.column_settings.media_only": "Nur vidaŭdaĵoj", "community.column_settings.remote_only": "Nur fora", "compose.language.change": "Ŝanĝi lingvon", "compose.language.search": "Serĉi lingvojn...", @@ -208,7 +208,7 @@ "confirmations.delete_list.message": "Ĉu vi certas, ke vi volas porĉiame forigi ĉi tiun liston?", "confirmations.delete_list.title": "Ĉu forigi liston?", "confirmations.discard_edit_media.confirm": "Forĵeti", - "confirmations.discard_edit_media.message": "Vi havas nekonservitajn ŝanĝojn de la priskribo aŭ la antaŭmontro de la plurmedio, ĉu vi forĵetu ilin malgraŭe?", + "confirmations.discard_edit_media.message": "Vi havas nekonservitajn ŝanĝojn de la priskribo aŭ la antaŭvidigo de la vidaŭdaĵo, ĉu vi forĵetu ilin malgraŭe?", "confirmations.edit.confirm": "Redakti", "confirmations.edit.message": "Redakti nun anstataŭigos la skribatan afiŝon. Ĉu vi certas, ke vi volas daŭrigi?", "confirmations.edit.title": "Ĉu superskribi afiŝon?", @@ -459,7 +459,7 @@ "keyboard_shortcuts.muted": "Malfermu la liston de silentigitaj uzantoj", "keyboard_shortcuts.my_profile": "Malfermu vian profilon", "keyboard_shortcuts.notifications": "Malfermu la sciigajn kolumnon", - "keyboard_shortcuts.open_media": "Malfermu plurmedion", + "keyboard_shortcuts.open_media": "Malfermi vidaŭdaĵon", "keyboard_shortcuts.pinned": "Malfermu alpinglitajn afiŝojn-liston", "keyboard_shortcuts.profile": "Malfermu la profilon de aŭtoroprofilo", "keyboard_shortcuts.reply": "Respondu al afiŝo", @@ -468,7 +468,7 @@ "keyboard_shortcuts.spoilers": "Montri/kaŝi CW-kampon", "keyboard_shortcuts.start": "Malfermu \"por komenci\" kolumnon", "keyboard_shortcuts.toggle_hidden": "Montri/kaŝi tekston malantaŭ CW", - "keyboard_shortcuts.toggle_sensitivity": "Montri/kaŝi plurmedion", + "keyboard_shortcuts.toggle_sensitivity": "Montri/kaŝi vidaŭdaĵojn", "keyboard_shortcuts.toot": "Komencu novan afiŝon", "keyboard_shortcuts.translate": "Traduki afiŝon", "keyboard_shortcuts.unfocus": "Senfokusigi verki tekstareon/serĉon", @@ -834,7 +834,7 @@ "status.load_more": "Ŝargi pli", "status.media.open": "Alklaki por malfermi", "status.media.show": "Alklaki por montri", - "status.media_hidden": "Plurmedio kaŝita", + "status.media_hidden": "Vidaŭdaĵo kaŝita", "status.mention": "Mencii @{name}", "status.more": "Pli", "status.mute": "Silentigi @{name}", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index 73c1785d4e..d569fc5ed1 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -205,6 +205,7 @@ "confirmations.logout.confirm": "Odhlásiť sa", "confirmations.logout.message": "Určite sa chcete odhlásiť?", "confirmations.logout.title": "Odhlásiť sa?", + "confirmations.missing_alt_text.secondary": "Odošli aj tak", "confirmations.mute.confirm": "Stíšiť", "confirmations.redraft.confirm": "Vymazať a prepísať", "confirmations.redraft.message": "Určite chcete tento príspevok vymazať a prepísať? Prídete o jeho zdieľania a ohviezdičkovania a odpovede na pôvodný príspevok budú odlúčené.", diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json index ce44f902f9..7274f425ea 100644 --- a/app/javascript/mastodon/locales/uk.json +++ b/app/javascript/mastodon/locales/uk.json @@ -219,6 +219,7 @@ "confirmations.logout.message": "Ви впевнені, що хочете вийти?", "confirmations.logout.title": "Вийти?", "confirmations.missing_alt_text.confirm": "Додати альтернативний текст", + "confirmations.missing_alt_text.message": "У вашому дописі є медіа без альтернативного тексту. Додавання опису допоможе зробити ваші матеріали доступними для більшої кількості людей.", "confirmations.missing_alt_text.secondary": "Все одно опублікувати", "confirmations.missing_alt_text.title": "Додати альтернативний текст?", "confirmations.mute.confirm": "Приховати", diff --git a/config/locales/doorkeeper.eo.yml b/config/locales/doorkeeper.eo.yml index 36a5ed1974..ede1ef815e 100644 --- a/config/locales/doorkeeper.eo.yml +++ b/config/locales/doorkeeper.eo.yml @@ -191,7 +191,7 @@ eo: write:filters: krei filtrilojn write:follows: sekvi homojn write:lists: krei listojn - write:media: alŝuti plurmediojn + write:media: alŝuti aŭdovidaĵojn write:mutes: silentigi homojn kaj konversaciojn write:notifications: forigi viajn sciigojn write:reports: signali aliajn homojn diff --git a/config/locales/eo.yml b/config/locales/eo.yml index d56d67e28e..085081b15a 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -363,7 +363,7 @@ eo: dashboard: active_users: aktivaj uzantoj interactions: interago - media_storage: Konservo de plurmedioj + media_storage: Konservo de aŭdovidaĵoj new_users: novaj uzantoj opened_reports: raportoj malfermitaj pending_appeals_html: @@ -508,7 +508,7 @@ eo: description_html: Vi povas difini enhavopolitikojn al la ĉiuj kontoj. limited_federation_mode_description_html: Vi povas elekti, ĉu permesi federacion kun tiu domajno. policies: - reject_media: Malakcepti plurmediojn + reject_media: Malakcepti la vidaŭdaĵojn reject_reports: Malakcepti raportojn silence: Kaŝu suspend: Suspendi diff --git a/config/locales/simple_form.eo.yml b/config/locales/simple_form.eo.yml index 7aafd666a5..499b692a28 100644 --- a/config/locales/simple_form.eo.yml +++ b/config/locales/simple_form.eo.yml @@ -56,10 +56,10 @@ eo: scopes: Kiujn API-ojn la aplikaĵo permesiĝos atingi. Se vi elektas supran amplekson, vi ne bezonas elekti la individuajn. setting_aggregate_reblogs: Ne montri novajn plusendojn de mesaĝoj lastatempe plusenditaj (nur efikas al nove ricevitaj plusendoj) setting_always_send_emails: Normale, la sciigoj per retpoŝto ne estos senditaj kiam vi uzas Mastodon aktive - setting_default_sensitive: Tiklaj plurmedioj estas kaŝitaj implicite, kaj povas esti montritaj per klako + setting_default_sensitive: Tiklaj vidaŭdaĵoj estas kaŝitaj implicite, kaj povas esti montritaj per klako setting_display_media_default: Kaŝi plurmediojn markitajn kiel tiklaj - setting_display_media_hide_all: Ĉiam kaŝi la plurmediojn - setting_display_media_show_all: Ĉiam montri la plurmediojn + setting_display_media_hide_all: Ĉiam kaŝi la vidaŭdaĵojn + setting_display_media_show_all: Ĉiam montri la vidaŭdaĵojn setting_system_scrollbars_ui: Aplikas nur por surtablaj retumiloj baziĝas de Safari kaj Chrome setting_use_blurhash: Transirojn estas bazita sur la koloroj de la kaŝitaj aŭdovidaĵoj sed ne montri iun ajn detalon setting_use_pending_items: Kaŝi tempoliniajn ĝisdatigojn malantaŭ klako anstataŭ aŭtomate rulumi la fluon @@ -223,11 +223,11 @@ eo: setting_boost_modal: Montri konfirman fenestron antaŭ ol diskonigi mesaĝon setting_default_language: Publikada lingvo setting_default_privacy: Privateco de afiŝado - setting_default_sensitive: Ĉiam marki plurmediojn kiel tiklaj + setting_default_sensitive: Ĉiam marki la vidaŭdaĵojn kiel tiklaj setting_delete_modal: Montri konfirman fenestron antaŭ ol forigi mesaĝon setting_disable_hover_cards: Malebligi profilan antaŭmontron kiam oni musumas setting_disable_swiping: Malebligi svingajn movojn - setting_display_media: Montrado de plurmedioj + setting_display_media: Vidigo de vidaŭdaĵoj setting_display_media_default: Implicita setting_display_media_hide_all: Kaŝi ĉiujn setting_display_media_show_all: Montri ĉiujn diff --git a/config/locales/simple_form.uk.yml b/config/locales/simple_form.uk.yml index 21a3ccce8e..83881a8dfa 100644 --- a/config/locales/simple_form.uk.yml +++ b/config/locales/simple_form.uk.yml @@ -232,6 +232,7 @@ uk: setting_display_media_show_all: Показати всі setting_expand_spoilers: Завжди розгортати дописи з попередженнями про вміст setting_hide_network: Сховати вашу мережу + setting_missing_alt_text_modal: Запитувати перед розміщенням медіа без альтернативного тексту setting_reduce_motion: Менше руху в анімаціях setting_system_font_ui: Використовувати типовий системний шрифт setting_system_scrollbars_ui: Використовувати системну панель гортання diff --git a/config/locales/sk.yml b/config/locales/sk.yml index a1257d4cd4..afc77db563 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -391,6 +391,7 @@ sk: email_domain_blocks: add_new: Pridaj nový allow_registrations_with_approval: Povoľ registrovanie so schválením + created_msg: Úspešne zablokovaná emailová doména delete: Vymaž dns: types: @@ -399,6 +400,7 @@ sk: new: create: Pridaj doménu resolve: Preveď doménu + title: Blokovať novú emailovú doménu not_permitted: Nepovolená resolved_through_html: Prevedená cez %{domain} title: Blokované e-mailové domény From 116f5826d3662f5e754088398b2dd6c2a071a413 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:54:15 +0100 Subject: [PATCH 03/12] chore(deps): update dependency webmock to v3.25.0 (#33848) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 26e1e31b0a..1e8a58acb8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -871,7 +871,7 @@ GEM webfinger (1.2.0) activesupport httpclient (>= 2.4) - webmock (3.24.0) + webmock (3.25.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) From 9701c6f148f27c8ccbe8bdd12e569ea069012f32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:54:22 +0100 Subject: [PATCH 04/12] fix(deps): update dependency sass to v1.84.0 (#33845) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2fe7c553cb..7096a8706c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15514,8 +15514,8 @@ __metadata: linkType: hard "sass@npm:^1.62.1": - version: 1.83.4 - resolution: "sass@npm:1.83.4" + version: 1.84.0 + resolution: "sass@npm:1.84.0" dependencies: "@parcel/watcher": "npm:^2.4.1" chokidar: "npm:^4.0.0" @@ -15526,7 +15526,7 @@ __metadata: optional: true bin: sass: sass.js - checksum: 10c0/6f27f0eebfeb50222b14baaeef548ef58a05daf8abd9797e6c499334ed7ad40541767056c8693780d06ca83d8836348ea7396a923d3be439b133507993ca78be + checksum: 10c0/4af28c12416b6f1fec2423677cfa8c48af7fb7652a50bd076e0cdd1ea260f0330948ddd6075368a734b8d6cfa16c9af5518292181334f47a9471cb542599bc7b languageName: node linkType: hard From aff2b11394404c85b751b69529efc5843d5c1111 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:54:27 +0100 Subject: [PATCH 05/12] chore(deps): update dependency fog-openstack to v1.1.4 (#33843) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1e8a58acb8..e2d3de64cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -252,7 +252,7 @@ GEM fog-json (1.2.0) fog-core multi_json (~> 1.10) - fog-openstack (1.1.3) + fog-openstack (1.1.4) fog-core (~> 2.1) fog-json (>= 1.0) formatador (1.1.0) @@ -407,7 +407,7 @@ GEM mime-types (3.6.0) logger mime-types-data (~> 3.2015) - mime-types-data (3.2025.0107) + mime-types-data (3.2025.0204) mini_mime (1.1.5) mini_portile2 (2.8.8) minitest (5.25.4) From 23a0d91126bef102dd3cdb8108e8aeccffb156c4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 6 Feb 2025 05:54:31 -0500 Subject: [PATCH 06/12] Combine examples to reduce factories in specs (#33841) --- .../concerns/api/rate_limit_headers_spec.rb | 6 +----- spec/controllers/filters/statuses_controller_spec.rb | 4 +--- spec/controllers/relationships_controller_spec.rb | 4 +--- spec/requests/well_known/webfinger_spec.rb | 8 +------- spec/workers/poll_expiration_notify_worker_spec.rb | 12 ++---------- spec/workers/publish_scheduled_status_worker_spec.rb | 8 ++------ spec/workers/unfollow_follow_worker_spec.rb | 10 ++-------- 7 files changed, 10 insertions(+), 42 deletions(-) diff --git a/spec/controllers/concerns/api/rate_limit_headers_spec.rb b/spec/controllers/concerns/api/rate_limit_headers_spec.rb index 74ed81f5da..dd16531350 100644 --- a/spec/controllers/concerns/api/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/api/rate_limit_headers_spec.rb @@ -40,15 +40,11 @@ RSpec.describe Api::RateLimitHeaders do end end - it 'applies rate limiting limit header' do + it 'provides rate limit information in headers' do expect(response.headers['X-RateLimit-Limit']).to eq '100' - end - it 'applies rate limiting remaining header' do expect(response.headers['X-RateLimit-Remaining']).to eq '80' - end - it 'applies rate limiting reset header' do expect(response.headers['X-RateLimit-Reset']).to eq (start_time + 10.seconds).iso8601(6) end end diff --git a/spec/controllers/filters/statuses_controller_spec.rb b/spec/controllers/filters/statuses_controller_spec.rb index f1fed76fca..7bad403571 100644 --- a/spec/controllers/filters/statuses_controller_spec.rb +++ b/spec/controllers/filters/statuses_controller_spec.rb @@ -23,11 +23,9 @@ RSpec.describe Filters::StatusesController do get :index, params: { filter_id: filter } end - it 'returns http success' do + it 'returns http success and private cache control headers' do expect(response).to have_http_status(200) - end - it 'returns private cache control headers' do expect(response.headers['Cache-Control']).to include('private, no-store') end end diff --git a/spec/controllers/relationships_controller_spec.rb b/spec/controllers/relationships_controller_spec.rb index 323fcc995d..75b5e71f35 100644 --- a/spec/controllers/relationships_controller_spec.rb +++ b/spec/controllers/relationships_controller_spec.rb @@ -14,11 +14,9 @@ RSpec.describe RelationshipsController do get :show, params: { page: 2, relationship: 'followed_by' } end - it 'returns http success' do + it 'returns http success and private cache control headers' do expect(response).to have_http_status(200) - end - it 'returns private cache control headers' do expect(response.headers['Cache-Control']).to include('private, no-store') end end diff --git a/spec/requests/well_known/webfinger_spec.rb b/spec/requests/well_known/webfinger_spec.rb index aeff56aebf..b4aeb65320 100644 --- a/spec/requests/well_known/webfinger_spec.rb +++ b/spec/requests/well_known/webfinger_spec.rb @@ -116,19 +116,13 @@ RSpec.describe 'The /.well-known/webfinger endpoint' do perform_request! end - it 'returns http success' do + it 'returns http success with expect headers and media type' do expect(response).to have_http_status(200) - end - it 'sets only a Vary Origin header' do expect(response.headers['Vary']).to eq('Origin') - end - it 'returns application/jrd+json' do expect(response.media_type).to eq 'application/jrd+json' - end - it 'returns links for the internal account' do expect(response.parsed_body) .to include( subject: 'acct:mastodon.internal@cb6e6126.ngrok.io', diff --git a/spec/workers/poll_expiration_notify_worker_spec.rb b/spec/workers/poll_expiration_notify_worker_spec.rb index b3ccdd3d77..190630608c 100644 --- a/spec/workers/poll_expiration_notify_worker_spec.rb +++ b/spec/workers/poll_expiration_notify_worker_spec.rb @@ -33,15 +33,11 @@ RSpec.describe PollExpirationNotifyWorker do end context 'when poll is local' do - it 'notifies voters' do + it 'notifies voters, owner, and local voters' do expect(ActivityPub::DistributePollUpdateWorker).to have_enqueued_sidekiq_job(poll.status.id) - end - it 'notifies owner' do expect(LocalNotificationWorker).to have_enqueued_sidekiq_job(poll.account.id, poll.id, 'Poll', 'poll') - end - it 'notifies local voters' do expect(LocalNotificationWorker).to have_enqueued_sidekiq_job(poll_vote.account.id, poll.id, 'Poll', 'poll') end end @@ -49,15 +45,11 @@ RSpec.describe PollExpirationNotifyWorker do context 'when poll is remote' do let(:remote?) { true } - it 'does not notify remote voters' do + it 'does not notify remote voters or owner, does notify local voters' do expect(ActivityPub::DistributePollUpdateWorker).to_not have_enqueued_sidekiq_job(poll.status.id) - end - it 'does not notify owner' do expect(LocalNotificationWorker).to_not have_enqueued_sidekiq_job(poll.account.id, poll.id, 'Poll', 'poll') - end - it 'notifies local voters' do expect(LocalNotificationWorker).to have_enqueued_sidekiq_job(poll_vote.account.id, poll.id, 'Poll', 'poll') end end diff --git a/spec/workers/publish_scheduled_status_worker_spec.rb b/spec/workers/publish_scheduled_status_worker_spec.rb index 9365e8a4bc..a91e665965 100644 --- a/spec/workers/publish_scheduled_status_worker_spec.rb +++ b/spec/workers/publish_scheduled_status_worker_spec.rb @@ -13,11 +13,9 @@ RSpec.describe PublishScheduledStatusWorker do end context 'when the account is not disabled' do - it 'creates a status' do + it 'creates a status and removes scheduled record' do expect(scheduled_status.account.statuses.first.text).to eq 'Hello world, future!' - end - it 'removes the scheduled status' do expect(ScheduledStatus.find_by(id: scheduled_status.id)).to be_nil end end @@ -25,11 +23,9 @@ RSpec.describe PublishScheduledStatusWorker do context 'when the account is disabled' do let(:scheduled_status) { Fabricate(:scheduled_status, account: Fabricate(:account, user: Fabricate(:user, disabled: true))) } - it 'does not create a status' do + it 'does not create a status and removes scheduled record' do expect(Status.count).to eq 0 - end - it 'removes the scheduled status' do expect(ScheduledStatus.find_by(id: scheduled_status.id)).to be_nil end end diff --git a/spec/workers/unfollow_follow_worker_spec.rb b/spec/workers/unfollow_follow_worker_spec.rb index 7b9d49b902..2e05d1ca78 100644 --- a/spec/workers/unfollow_follow_worker_spec.rb +++ b/spec/workers/unfollow_follow_worker_spec.rb @@ -18,14 +18,11 @@ RSpec.describe UnfollowFollowWorker do let(:show_reblogs) { true } describe 'perform' do - it 'unfollows source account and follows target account' do + it 'unfollows source account and follows target account and preserves show_reblogs' do subject.perform(local_follower.id, source_account.id, target_account.id) expect(local_follower.following?(source_account)).to be false expect(local_follower.following?(target_account)).to be true - end - it 'preserves show_reblogs' do - subject.perform(local_follower.id, source_account.id, target_account.id) expect(Follow.find_by(account: local_follower, target_account: target_account).show_reblogs?).to be show_reblogs end end @@ -35,14 +32,11 @@ RSpec.describe UnfollowFollowWorker do let(:show_reblogs) { false } describe 'perform' do - it 'unfollows source account and follows target account' do + it 'unfollows source account and follows target account and preserves show_reblogs' do subject.perform(local_follower.id, source_account.id, target_account.id) expect(local_follower.following?(source_account)).to be false expect(local_follower.following?(target_account)).to be true - end - it 'preserves show_reblogs' do - subject.perform(local_follower.id, source_account.id, target_account.id) expect(Follow.find_by(account: local_follower, target_account: target_account).show_reblogs?).to be show_reblogs end end From d8f1881ab0237bfd35c2c2ed681afa64d43c2007 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:18:20 +0100 Subject: [PATCH 07/12] chore(deps): update dependency fog-core to v2.6.0 (#33775) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e2d3de64cd..a553a8645a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,7 +220,7 @@ GEM erubi (1.13.1) et-orbi (1.2.11) tzinfo - excon (0.112.0) + excon (1.2.3) fabrication (2.31.0) faker (3.5.1) i18n (>= 1.8.11, < 2) @@ -244,9 +244,9 @@ GEM flatware-rspec (2.3.4) flatware (= 2.3.4) rspec (>= 3.6) - fog-core (2.5.0) + fog-core (2.6.0) builder - excon (~> 0.71) + excon (~> 1.0) formatador (>= 0.2, < 2.0) mime-types fog-json (1.2.0) From 6d5e6a6818d11fe7b805cac0148b39ff6409ffcf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:18:41 +0100 Subject: [PATCH 08/12] chore(deps): update dependency rspec-rails to v7.1.1 (#33850) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a553a8645a..935cfcc270 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -697,7 +697,7 @@ GEM rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.2) + rspec-core (3.13.3) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) @@ -707,7 +707,7 @@ GEM rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.1.0) + rspec-rails (7.1.1) actionpack (>= 7.0) activesupport (>= 7.0) railties (>= 7.0) From 5ffc17415c5ea85bd378bff21dad538fba8492fd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:48:43 +0100 Subject: [PATCH 09/12] chore(deps): update dependency ruby-vips to v2.2.3 (#33853) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 935cfcc270..d4d40c3646 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -753,7 +753,7 @@ GEM ruby-saml (1.17.0) nokogiri (>= 1.13.10) rexml - ruby-vips (2.2.2) + ruby-vips (2.2.3) ffi (~> 1.12) logger rubyzip (2.4.1) From b7bc7cd08720ff262112e73f905ebdf2a60134d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:51:09 +0100 Subject: [PATCH 10/12] New Crowdin Translations (automated) (#33856) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/eo.json | 24 +++++++++++----------- app/javascript/mastodon/locales/ja.json | 8 ++++++++ app/javascript/mastodon/locales/pt-PT.json | 2 +- app/javascript/mastodon/locales/sk.json | 1 + 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json index c1dad2eacf..9ec4c4e8a6 100644 --- a/app/javascript/mastodon/locales/eo.json +++ b/app/javascript/mastodon/locales/eo.json @@ -540,7 +540,7 @@ "navigation_bar.follows_and_followers": "Sekvatoj kaj sekvantoj", "navigation_bar.lists": "Listoj", "navigation_bar.logout": "Elsaluti", - "navigation_bar.moderation": "Modereco", + "navigation_bar.moderation": "Reguligo", "navigation_bar.mutes": "Silentigitaj uzantoj", "navigation_bar.opened_in_classic_interface": "Afiŝoj, kontoj, kaj aliaj specifaj paĝoj kiuj estas malfermititaj defaulta en la klasika reta interfaco.", "navigation_bar.personal": "Persone", @@ -574,11 +574,11 @@ "notification.mention": "Mencii", "notification.mentioned_you": "{name} menciis vin", "notification.moderation-warning.learn_more": "Lerni pli", - "notification.moderation_warning": "Vi ricevis moderigan averton", + "notification.moderation_warning": "Vi ricevis reguligan averton", "notification.moderation_warning.action_delete_statuses": "Kelkaj el viaj afiŝoj estis forigitaj.", "notification.moderation_warning.action_disable": "Via konto estas malŝaltita.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Kelkaj el viaj afiŝoj estis markitaj kiel sentemaj.", - "notification.moderation_warning.action_none": "Via konto ricevis moderigan averton.", + "notification.moderation_warning.action_none": "Via konto ricevis reguligan averton.", "notification.moderation_warning.action_sensitive": "Viaj afiŝoj estos markitaj kiel sentemaj ekde nun.", "notification.moderation_warning.action_silence": "Via konto estis limigita.", "notification.moderation_warning.action_suspend": "Via konto estas malakceptita.", @@ -605,8 +605,8 @@ "notification_requests.dismiss_multiple": "{count, plural, one {Malakcepti # peton…} other {# Malakcepti # petojn…}}", "notification_requests.edit_selection": "Redakti", "notification_requests.exit_selection": "Farita", - "notification_requests.explainer_for_limited_account": "Sciigoj de ĉi tiu konto estis filtritaj ĉar la konto estis limigita de moderanto.", - "notification_requests.explainer_for_limited_remote_account": "Sciigoj de ĉi tiu konto estis filtritaj ĉar la konto aŭ ĝia servilo estis limigitaj de moderanto.", + "notification_requests.explainer_for_limited_account": "Sciigoj de ĉi tiu konto estis filtritaj ĉar la konto estis limigita de reguligisto.", + "notification_requests.explainer_for_limited_remote_account": "Sciigoj de ĉi tiu konto estis filtritaj ĉar la konto aŭ ĝia servilo estis limigitaj de reguligisto.", "notification_requests.maximize": "Maksimumigi", "notification_requests.minimize_banner": "Minimumigi filtritajn sciigojn-rubandon", "notification_requests.notifications_from": "Sciigoj de {name}", @@ -653,8 +653,8 @@ "notifications.policy.drop_hint": "Sendi al la malpleno, por neniam esti vidita denove", "notifications.policy.filter": "Filtri", "notifications.policy.filter_hint": "Sendi al filtritaj sciigoj-enirkesto", - "notifications.policy.filter_limited_accounts_hint": "Limigita de servilaj moderigantoj", - "notifications.policy.filter_limited_accounts_title": "Moderigitaj kontoj", + "notifications.policy.filter_limited_accounts_hint": "Limigita de servilaj reguligistoj", + "notifications.policy.filter_limited_accounts_title": "Reguligitaj kontoj", "notifications.policy.filter_new_accounts.hint": "Kreite en la {days, plural, one {lasta tago} other {# lastaj tagoj}}", "notifications.policy.filter_new_accounts_title": "Novaj kontoj", "notifications.policy.filter_not_followers_hint": "Inkluzive de homoj, kiuj sekvis vin malpli ol {days, plural, one {unu tago} other {# tagoj}}", @@ -781,7 +781,7 @@ "search.quick_action.go_to_account": "Iri al profilo {x}", "search.quick_action.go_to_hashtag": "Iri al kradvorto {x}", "search.quick_action.open_url": "Malfermi URL en Mastodono", - "search.quick_action.status_search": "Afiŝoj kiuj kongruas kun {x}", + "search.quick_action.status_search": "Afiŝoj kiuj konformas kun {x}", "search.search_or_paste": "Serĉu aŭ algluu URL-on", "search_popout.full_text_search_disabled_message": "Ne havebla sur {domain}.", "search_popout.full_text_search_logged_out_message": "Disponebla nur kiam ensalutinte.", @@ -796,7 +796,7 @@ "search_results.hashtags": "Kradvortoj", "search_results.no_results": "Ne estas rezultoj.", "search_results.no_search_yet": "Provu serĉi afiŝojn, profilojn aŭ kradvortojn.", - "search_results.see_all": "Vidu ĉiujn", + "search_results.see_all": "Vidi ĉiujn", "search_results.statuses": "Afiŝoj", "search_results.title": "Serĉu \"{q}\"", "server_banner.about_active_users": "Personoj uzantaj ĉi tiun servilon dum la lastaj 30 tagoj (Aktivaj Uzantoj Monate)", @@ -809,9 +809,9 @@ "sign_in_banner.mastodon_is": "Mastodon estas la plej bona maniero resti ĝisdata pri aktualaĵoj.", "sign_in_banner.sign_in": "Ensaluti", "sign_in_banner.sso_redirect": "Ensalutu aŭ Registriĝi", - "status.admin_account": "Malfermi fasadon de moderigado por @{name}", - "status.admin_domain": "Malfermu moderigan interfacon por {domain}", - "status.admin_status": "Malfermi ĉi tiun afiŝon en la kontrola interfaco", + "status.admin_account": "Malfermi fasadon de la reguligado por @{name}", + "status.admin_domain": "Malfermi fasadon de la reguligado por {domain}", + "status.admin_status": "Malfermi ĉi tiun afiŝon en la fasado de la reguligado", "status.block": "Bloki @{name}", "status.bookmark": "Aldoni al la legosignoj", "status.cancel_reblog_private": "Ne plu diskonigi", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index 0c9b4a6062..ea48d78e95 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -87,8 +87,11 @@ "alert.unexpected.title": "エラー!", "alt_text_badge.title": "代替テキスト", "alt_text_modal.add_alt_text": "代替テキストを追加", + "alt_text_modal.add_text_from_image": "画像からテキストを追加", "alt_text_modal.cancel": "キャンセル", "alt_text_modal.change_thumbnail": "サムネイルを変更", + "alt_text_modal.describe_for_people_with_hearing_impairments": "耳の不自由な方のために説明してください…", + "alt_text_modal.describe_for_people_with_visual_impairments": "目が不自由な方のために説明してください…", "alt_text_modal.done": "完了", "announcement.announcement": "お知らせ", "annual_report.summary.archetype.booster": "トレンドハンター", @@ -215,6 +218,10 @@ "confirmations.logout.confirm": "ログアウト", "confirmations.logout.message": "本当にログアウトしますか?", "confirmations.logout.title": "ログアウトしようとしています", + "confirmations.missing_alt_text.confirm": "代替テキストを追加", + "confirmations.missing_alt_text.message": "あなたの投稿には大体テキストのないメディアが含まれています。説明文を追加することで、より多くの人がコンテンツにアクセスできるようになります。", + "confirmations.missing_alt_text.secondary": "そのまま投稿する", + "confirmations.missing_alt_text.title": "代替テキストを追加しますか?", "confirmations.mute.confirm": "ミュート", "confirmations.redraft.confirm": "削除して下書きに戻す", "confirmations.redraft.message": "投稿を削除して下書きに戻します。この投稿へのお気に入り登録やブーストは失われ、返信は孤立することになります。よろしいですか?", @@ -463,6 +470,7 @@ "keyboard_shortcuts.toggle_hidden": "CWで隠れた文を見る/隠す", "keyboard_shortcuts.toggle_sensitivity": "非表示のメディアを見る/隠す", "keyboard_shortcuts.toot": "新規投稿", + "keyboard_shortcuts.translate": "投稿を翻訳する", "keyboard_shortcuts.unfocus": "投稿の入力欄・検索欄から離れる", "keyboard_shortcuts.up": "カラム内一つ上に移動", "lightbox.close": "閉じる", diff --git a/app/javascript/mastodon/locales/pt-PT.json b/app/javascript/mastodon/locales/pt-PT.json index cbc795945d..aaa36704d7 100644 --- a/app/javascript/mastodon/locales/pt-PT.json +++ b/app/javascript/mastodon/locales/pt-PT.json @@ -817,7 +817,7 @@ "status.cancel_reblog_private": "Retirar impulso", "status.cannot_reblog": "Esta publicação não pode ser impulsionada", "status.continued_thread": "Continuação da conversa", - "status.copy": "Copiar hiperligação para a publicação", + "status.copy": "Copiar hiperligação da publicação", "status.delete": "Eliminar", "status.detailed_status": "Vista pormenorizada da conversa", "status.direct": "Mencionar @{name} em privado", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index d569fc5ed1..b9f0fd1b33 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -320,6 +320,7 @@ "follow_requests.unlocked_explanation": "Aj keď váš účet nie je uzamknutý, tím domény {domain} si myslel, že môžete chcieť skontrolovať žiadosti o sledovanie z týchto účtov manuálne.", "follow_suggestions.curated_suggestion": "Výber redakcie", "follow_suggestions.dismiss": "Znova nezobrazovať", + "follow_suggestions.featured_longer": "Ručne vybrané tímom {domain}", "follow_suggestions.friends_of_friends_longer": "Populárne medzi ľudmi ktorých nasleduješ", "follow_suggestions.hints.featured": "Tento profil bol ručne zvolený tímom domény {domain}.", "follow_suggestions.hints.friends_of_friends": "Tento profil je obľúbený medzi účtami, ktoré sledujete.", From 38a3e8d0e3a10b1e885428ccee62e6e690353c8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:11:01 +0100 Subject: [PATCH 11/12] chore(deps): update dependency webauthn to v3.3.0 (#33857) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d4d40c3646..9d0928354b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -350,7 +350,7 @@ GEM addressable (~> 2.8) bigdecimal (~> 3.1) jsonapi-renderer (0.2.2) - jwt (2.9.3) + jwt (2.10.1) base64 kaminari (1.2.2) activesupport (>= 4.1.0) @@ -461,7 +461,7 @@ GEM validate_email validate_url webfinger (~> 1.2) - openssl (3.2.1) + openssl (3.3.0) openssl-signature_algorithm (1.3.0) openssl (> 2.0) opentelemetry-api (1.4.0) @@ -825,7 +825,7 @@ GEM thor (1.3.2) tilt (2.6.0) timeout (0.4.3) - tpm-key_attestation (0.12.1) + tpm-key_attestation (0.14.0) bindata (~> 2.4) openssl (> 2.0) openssl-signature_algorithm (~> 1.0) @@ -860,14 +860,14 @@ GEM public_suffix warden (1.2.9) rack (>= 2.0.9) - webauthn (3.2.2) + webauthn (3.3.0) android_key_attestation (~> 0.3.0) bindata (~> 2.4) cbor (~> 0.5.9) cose (~> 1.1) openssl (>= 2.2) safety_net_attestation (~> 0.4.0) - tpm-key_attestation (~> 0.12.0) + tpm-key_attestation (~> 0.14.0) webfinger (1.2.0) activesupport httpclient (>= 2.4) From 1cf30717dbe7a0038a645c62f19deef7efc42207 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 7 Feb 2025 11:22:59 +0100 Subject: [PATCH 12/12] Fix potential inefficiency in media privacy system check (#33858) --- app/lib/admin/system_check/media_privacy_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/admin/system_check/media_privacy_check.rb b/app/lib/admin/system_check/media_privacy_check.rb index 2ddc8e8b07..378a8ce294 100644 --- a/app/lib/admin/system_check/media_privacy_check.rb +++ b/app/lib/admin/system_check/media_privacy_check.rb @@ -76,7 +76,7 @@ class Admin::SystemCheck::MediaPrivacyCheck < Admin::SystemCheck::BaseCheck def media_attachment @media_attachment ||= begin - attachment = Account.representative.media_attachments.first + attachment = Account.representative.media_attachments.take if attachment.present? attachment.touch attachment