From 3f81e7dcc8afbb86e48c36773fe2bc7018b44379 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:16:24 +0200 Subject: [PATCH 01/10] chore(deps): update dependency @types/http-link-header to v1.0.6 (#30814) 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 ff4e1110d9..b6117d821e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3622,11 +3622,11 @@ __metadata: linkType: hard "@types/http-link-header@npm:^1.0.3": - version: 1.0.5 - resolution: "@types/http-link-header@npm:1.0.5" + version: 1.0.6 + resolution: "@types/http-link-header@npm:1.0.6" dependencies: "@types/node": "npm:*" - checksum: 10c0/adeb13381b38c3625478149820772924c154b4a7250dca62c346810a8378f8968fc7f3a9a4f55ec61de5d06083637540f862c8a920f6a710310c9645d19a077d + checksum: 10c0/63f3f7ab5ff6312280727ba8cf836abf5d1b76f9dc5eefc8cd4389db29d57a72fb0e028db99735ada5ccfd3c2cc6607e096b5cc142fc53c2bb5688b6295f61af languageName: node linkType: hard From 6d14cfbf298eec6e2ffcd4ad69a118cdd168b3a1 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 24 Jun 2024 06:18:36 -0400 Subject: [PATCH 02/10] Unset Rails/UnusedIgnoredColumns (#30800) --- .rubocop/rails.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.rubocop/rails.yml b/.rubocop/rails.yml index 4e08f1ab91..68c90143a6 100644 --- a/.rubocop/rails.yml +++ b/.rubocop/rails.yml @@ -18,6 +18,3 @@ Rails/RakeEnvironment: Rails/SkipsModelValidations: Enabled: false - -Rails/UnusedIgnoredColumns: - Enabled: false # Preserve ability to migrate from arbitrary old versions From b3710098a8edcb5cc317a280758b2a772ea722ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:18:51 +0200 Subject: [PATCH 03/10] chore(deps): update dependency opentelemetry-instrumentation-faraday to v0.24.5 (#30797) 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 0fe1c03b25..abd31f49aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -532,7 +532,7 @@ GEM opentelemetry-instrumentation-excon (0.22.3) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-faraday (0.24.4) + opentelemetry-instrumentation-faraday (0.24.5) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-http (0.23.3) From 54cc204473302eda7e6e7e75b343a14859524ab1 Mon Sep 17 00:00:00 2001 From: Essem Date: Mon, 24 Jun 2024 05:29:00 -0500 Subject: [PATCH 04/10] Use WebSocketServer instead of WebSocket.Server in streaming (#30788) --- streaming/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streaming/index.js b/streaming/index.js index 154ecbc02c..65a63bb114 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -12,7 +12,7 @@ import { Redis } from 'ioredis'; import { JSDOM } from 'jsdom'; import pg from 'pg'; import pgConnectionString from 'pg-connection-string'; -import WebSocket from 'ws'; +import { WebSocketServer } from 'ws'; import { AuthenticationError, RequestError, extractStatusAndMessage as extractErrorStatusAndMessage } from './errors.js'; import { logger, httpLogger, initializeLogLevel, attachWebsocketHttpLogger, createWebsocketLogger } from './logging.js'; @@ -289,7 +289,7 @@ const CHANNEL_NAMES = [ const startServer = async () => { const pgPool = new pg.Pool(pgConfigFromEnv(process.env)); const server = http.createServer(); - const wss = new WebSocket.Server({ noServer: true }); + const wss = new WebSocketServer({ noServer: true }); // Set the X-Request-Id header on WebSockets: wss.on("headers", function onHeaders(headers, req) { From 1af6313ced5b39041cb8c480b1f0c65155429238 Mon Sep 17 00:00:00 2001 From: Essem Date: Mon, 24 Jun 2024 05:36:26 -0500 Subject: [PATCH 05/10] Fix CMD syntax in streaming Dockerfile (#30795) --- streaming/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streaming/Dockerfile b/streaming/Dockerfile index 319d5b7fd8..d9f7615fa8 100644 --- a/streaming/Dockerfile +++ b/streaming/Dockerfile @@ -110,4 +110,4 @@ USER mastodon # Expose default Streaming ports EXPOSE 4000 # Run streaming when started -CMD [ node ./streaming/index.js ] +CMD [ "node", "./streaming/index.js" ] From 61722b1b1fb36ff5c3d6c470981f5fc6648e2d14 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:46:53 +0200 Subject: [PATCH 06/10] New Crowdin Translations (automated) (#30808) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/fil.json | 7 +++++++ app/javascript/mastodon/locales/pt-BR.json | 4 ++++ app/javascript/mastodon/locales/zh-TW.json | 2 +- config/locales/doorkeeper.pt-BR.yml | 2 ++ config/locales/pt-BR.yml | 1 + config/locales/ru.yml | 4 ++++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/locales/fil.json b/app/javascript/mastodon/locales/fil.json index 9e459f7671..b8a2987ef0 100644 --- a/app/javascript/mastodon/locales/fil.json +++ b/app/javascript/mastodon/locales/fil.json @@ -118,6 +118,7 @@ "confirmations.delete_list.confirm": "Tanggalin", "confirmations.delete_list.message": "Sigurado ka bang gusto mong burahin ang listahang ito?", "confirmations.discard_edit_media.confirm": "Ipagpaliban", + "confirmations.domain_block.confirm": "Harangan ang serbiro", "confirmations.edit.confirm": "Baguhin", "confirmations.reply.confirm": "Tumugon", "conversation.mark_as_read": "Markahan bilang nabasa na", @@ -186,6 +187,7 @@ "follow_request.authorize": "Tanggapin", "follow_request.reject": "Tanggihan", "follow_suggestions.dismiss": "Huwag nang ipakita muli", + "follow_suggestions.popular_suggestion_longer": "Sikat sa {domain}", "follow_suggestions.view_all": "Tingnan lahat", "follow_suggestions.who_to_follow": "Sinong maaaring sundan", "footer.about": "Tungkol dito", @@ -220,6 +222,7 @@ "link_preview.author": "Ni/ng {name}", "lists.account.add": "Idagdag sa talaan", "lists.account.remove": "Tanggalin mula sa talaan", + "lists.delete": "Burahin ang talaan", "lists.new.create": "Idagdag sa talaan", "lists.new.title_placeholder": "Bagong pangalan ng talaan", "lists.replies_policy.title": "Ipakita ang mga tugon sa:", @@ -287,9 +290,13 @@ "reply_indicator.cancel": "Ipagpaliban", "report.block": "Harangan", "report.categories.other": "Iba pa", + "report.categories.violation": "Lumalabag ang nilalaman sa isa o higit pang mga patakaran ng serbiro", + "report.category.subtitle": "Piliin ang pinakamahusay na tugma", "report.category.title": "Sabihin mo sa amin kung anong nangyari sa {type} na ito", "report.close": "Tapos na", "report.next": "Sunod", + "report.placeholder": "Mga Karagdagang Puna", + "report.reasons.dislike": "Hindi ko gusto ito", "report.reasons.violation": "Lumalabag ito sa mga panuntunan ng serbiro", "report.reasons.violation_description": "Alam mo na lumalabag ito sa mga partikular na panuntunan", "report.rules.title": "Aling mga patakaran ang nilabag?", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index afe5490547..4d3bd2d280 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -415,6 +415,7 @@ "limited_account_hint.title": "Este perfil foi ocultado pelos moderadores do {domain}.", "link_preview.author": "Por {name}", "link_preview.more_from_author": "Mais de {name}", + "link_preview.shares": "{count, plural, one {{counter} publicação} other {{counter} publicações}}", "lists.account.add": "Adicionar à lista", "lists.account.remove": "Remover da lista", "lists.delete": "Excluir lista", @@ -695,8 +696,11 @@ "server_banner.about_active_users": "Pessoas usando este servidor durante os últimos 30 dias (Usuários ativos mensalmente)", "server_banner.active_users": "usuários ativos", "server_banner.administered_by": "Administrado por:", + "server_banner.is_one_of_many": "{domain} é um dos muitos servidores Mastodon independentes que você pode usar para participar do fediverso.", "server_banner.server_stats": "Estatísticas do servidor:", "sign_in_banner.create_account": "Criar conta", + "sign_in_banner.follow_anyone": "Siga alguém pelo fediverso e veja tudo em ordem cronológica. Sem algoritmos, anúncios ou clickbait à vista.", + "sign_in_banner.mastodon_is": "O Mastodon é a melhor maneira de acompanhar o que está acontecendo.", "sign_in_banner.sign_in": "Entrar", "sign_in_banner.sso_redirect": "Entrar ou Registrar-se", "status.admin_account": "Abrir interface de moderação para @{name}", diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index e6cd62162b..4ab22daba5 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -62,7 +62,7 @@ "account.requested": "正在等候審核。按一下以取消跟隨請求", "account.requested_follow": "{name} 要求跟隨您", "account.share": "分享 @{name} 的個人檔案", - "account.show_reblogs": "顯示來自 @{name} 的嘟文", + "account.show_reblogs": "顯示來自 @{name} 的轉嘟", "account.statuses_counter": "{count, plural,one {{counter} 則}other {{counter} 則}}嘟文", "account.unblock": "解除封鎖 @{name}", "account.unblock_domain": "解除封鎖網域 {domain}", diff --git a/config/locales/doorkeeper.pt-BR.yml b/config/locales/doorkeeper.pt-BR.yml index d7e9353b59..6b076e9081 100644 --- a/config/locales/doorkeeper.pt-BR.yml +++ b/config/locales/doorkeeper.pt-BR.yml @@ -135,6 +135,7 @@ pt-BR: media: Mídias anexadas mutes: Silenciados notifications: Notificações + profile: Seu perfil do Mastodon push: Notificações push reports: Denúncias search: Buscar @@ -165,6 +166,7 @@ pt-BR: admin:write:reports: executar ações de moderação em denúncias crypto: usar criptografia de ponta-a-ponta follow: alterar o relacionamento das contas + profile: ler somente as informações do perfil da sua conta push: receber notificações push read: ler todos os dados da sua conta read:accounts: ver informações das contas diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 8d3b53f777..584a9253b8 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -293,6 +293,7 @@ pt-BR: filter_by_action: Filtrar por ação filter_by_user: Filtrar por usuário title: Auditar histórico + unavailable_instance: "(nome de domínio indisponível)" announcements: destroyed_msg: Anúncio excluído! edit: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 6dff92bb6d..5f5b3676fb 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1699,6 +1699,7 @@ ru: import: Импорт import_and_export: Импорт и экспорт migrate: Миграция учётной записи + notifications: Уведомления по электронной почте preferences: Настройки profile: Профиль relationships: Подписки и подписчики @@ -1706,6 +1707,9 @@ ru: strikes: Замечания модерации two_factor_authentication: Подтверждение входа webauthn_authentication: Ключи безопасности + severed_relationships: + event_type: + user_domain_block: Вы заблокировали %{target_name} statuses: attached: audio: From 8827cd597e695c0368dfdce582755eda7f667272 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 24 Jun 2024 15:11:10 +0200 Subject: [PATCH 07/10] Fix `/admin/accounts/:account_id/statuses/:id` for edited posts with media attachments (#30819) --- app/models/status_edit.rb | 2 +- spec/controllers/admin/statuses_controller_spec.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/status_edit.rb b/app/models/status_edit.rb index 50dabb91f5..089c42fb99 100644 --- a/app/models/status_edit.rb +++ b/app/models/status_edit.rb @@ -42,7 +42,7 @@ class StatusEdit < ApplicationRecord scope :ordered, -> { order(id: :asc) } delegate :local?, :application, :edited?, :edited_at, - :discarded?, :visibility, to: :status + :discarded?, :visibility, :language, to: :status def emojis return @emojis if defined?(@emojis) diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb index 4e8bf9ead6..4144d97d64 100644 --- a/spec/controllers/admin/statuses_controller_spec.rb +++ b/spec/controllers/admin/statuses_controller_spec.rb @@ -44,6 +44,11 @@ describe Admin::StatusesController do describe 'GET #show' do before do + status.media_attachments << Fabricate(:media_attachment, type: :image, account: status.account) + status.save! + status.snapshot!(at_time: status.created_at, rate_limit: false) + status.update!(text: 'Hello, this is an edited post') + status.snapshot!(rate_limit: false) get :show, params: { account_id: account.id, id: status.id } end From f6e466058a5a70eba5001c7ad3a80d86c07eb25d Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Mon, 24 Jun 2024 09:41:04 -0500 Subject: [PATCH 08/10] Added check for STATSD_ADDR setting to emit a warning and proceed rather than crashing if the address is unreachable (#30691) --- config/initializers/statsd.rb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/config/initializers/statsd.rb b/config/initializers/statsd.rb index a655c10716..f1628a9d12 100644 --- a/config/initializers/statsd.rb +++ b/config/initializers/statsd.rb @@ -3,13 +3,17 @@ if ENV['STATSD_ADDR'].present? host, port = ENV['STATSD_ADDR'].split(':') - statsd = Statsd.new(host, port) - statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') } + begin + statsd = Statsd.new(host, port) + statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') } - NSA.inform_statsd(statsd) do |informant| - informant.collect(:action_controller, :web) - informant.collect(:active_record, :db) - informant.collect(:active_support_cache, :cache) - informant.collect(:sidekiq, :sidekiq) if ENV['STATSD_SIDEKIQ'] == 'true' + NSA.inform_statsd(statsd) do |informant| + informant.collect(:action_controller, :web) + informant.collect(:active_record, :db) + informant.collect(:active_support_cache, :cache) + informant.collect(:sidekiq, :sidekiq) if ENV['STATSD_SIDEKIQ'] == 'true' + end + rescue + Rails.logger.warn("statsd address #{ENV['STATSD_ADDR']} not reachable, proceeding without statsd") end end From 39d80e84be660e6d3eb121ee8f1067bd87cc3783 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 24 Jun 2024 10:47:14 -0400 Subject: [PATCH 09/10] Remove `lockfileMaintenance` setting (#30799) --- .github/renovate.json5 | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 03787dfac6..2cf7bec8ee 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -14,9 +14,6 @@ // to `null` after any other rule set it to something. dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).', postUpdateOptions: ['yarnDedupeHighest'], - lockFileMaintenance: { - enabled: true, - }, packageRules: [ { // Require Dependency Dashboard Approval for major version bumps of these node packages From 6527d5039141fe4a80645147b581d76952a64f39 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 24 Jun 2024 10:50:37 -0400 Subject: [PATCH 10/10] Disable `Rails/BulkChangeTable` cop (#30820) --- .rubocop/rails.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop/rails.yml b/.rubocop/rails.yml index 68c90143a6..ae31c1f266 100644 --- a/.rubocop/rails.yml +++ b/.rubocop/rails.yml @@ -1,4 +1,7 @@ --- +Rails/BulkChangeTable: + Enabled: false # Conflicts with strong_migrations features + Rails/FilePath: EnforcedStyle: arguments