diff --git a/CHANGELOG.md b/CHANGELOG.md index 48129660ca1169..7235d309aa3b5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## [4.4.9] - 2025-11-20 + +### Fixed + +- Fix `tootctl upgrade storage-schema` failing with `ArgumentError` (#36914 by @shugo) +- Fix old previously-undiscovered posts being treated as new when receiving an `Update` (#36848 by @ClearlyClaire) +- Fix filters not being applied to quotes in detailed view (#36843 by @ClearlyClaire) + ## [4.4.8] - 2025-10-21 ### Security diff --git a/app/javascript/mastodon/features/status/components/detailed_status.tsx b/app/javascript/mastodon/features/status/components/detailed_status.tsx index a09b14b6570aea..8df078253f6535 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.tsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.tsx @@ -460,6 +460,7 @@ export const DetailedStatus: React.FC<{ )} diff --git a/app/lib/activitypub/activity/update.rb b/app/lib/activitypub/activity/update.rb index b8365819ccd340..b1ed096c9a9b01 100644 --- a/app/lib/activitypub/activity/update.rb +++ b/app/lib/activitypub/activity/update.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true class ActivityPub::Activity::Update < ActivityPub::Activity + # Updates to unknown objects older than that are ignored + OBJECT_AGE_THRESHOLD = 1.day + def perform @account.schedule_refresh_if_stale! @@ -28,6 +31,9 @@ def update_status @status = Status.find_by(uri: object_uri, account_id: @account.id) + # Ignore updates for old unknown objects, since those are updates we are not interested in + return if @status.nil? && object_too_old? + # We may be getting `Create` and `Update` out of order @status ||= ActivityPub::Activity::Create.new(@json, @account, **@options).perform @@ -45,4 +51,10 @@ def forward_for_conversation ActivityPub::ForwardConversationWorker.perform_async(Oj.dump(@json), @status.id, true) end + + def object_too_old? + @object['published'].present? && @object['published'].to_datetime < OBJECT_AGE_THRESHOLD.ago + rescue Date::Error + false + end end diff --git a/docker-compose.yml b/docker-compose.yml index e6327bd5b31187..d0b470f377d212 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,7 +59,7 @@ services: web: # You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes build: . - image: kmyblue:19.9-lts + image: kmyblue:19.10-lts restart: always env_file: .env.production command: bundle exec puma -C config/puma.rb @@ -83,7 +83,7 @@ services: build: dockerfile: ./streaming/Dockerfile context: . - image: kmyblue-streaming:19.9-lts + image: kmyblue-streaming:19.10-lts restart: always env_file: .env.production command: node ./streaming/index.js @@ -101,7 +101,7 @@ services: sidekiq: build: . - image: kmyblue:19.9-lts + image: kmyblue:19.10-lts restart: always env_file: .env.production command: bundle exec sidekiq diff --git a/lib/mastodon/cli/upgrade.rb b/lib/mastodon/cli/upgrade.rb index 2cb510579484a5..d5822cacc0c87f 100644 --- a/lib/mastodon/cli/upgrade.rb +++ b/lib/mastodon/cli/upgrade.rb @@ -123,12 +123,12 @@ def upgrade_storage_filesystem(progress, attachment, style) progress.log("Moving #{previous_path} to #{upgraded_path}") if options[:verbose] begin - move_previous_to_upgraded + move_previous_to_upgraded(previous_path, upgraded_path) rescue => e progress.log(pastel.red("Error processing #{previous_path}: #{e}")) success = false - remove_directory + remove_directory(upgraded_path) end end diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 85f2f2fb9f4560..d1c702275ebd97 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ def kmyblue_major end def kmyblue_minor - 9 + 10 end def kmyblue_flag @@ -31,7 +31,7 @@ def minor end def patch - 8 + 9 end def default_prerelease diff --git a/package.json b/package.json index 4ab1aa8857abe8..0db2c88f366684 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "http-link-header": "^1.1.1", "immutable": "^4.3.0", "intl-messageformat": "^10.7.16", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "lande": "^1.0.10", "lodash": "^4.17.21", "marky": "^1.2.5", diff --git a/spec/lib/activitypub/activity_spec.rb b/spec/lib/activitypub/activity_spec.rb index 218da04d9b5e7a..d7d0700dc65c0b 100644 --- a/spec/lib/activitypub/activity_spec.rb +++ b/spec/lib/activitypub/activity_spec.rb @@ -34,6 +34,8 @@ } end + let(:publication_date) { 1.hour.ago.utc } + let(:create_json) do { '@context': [ @@ -52,7 +54,7 @@ 'https://www.w3.org/ns/activitystreams#Public', ], content: 'foo', - published: '2025-05-24T11:03:10Z', + published: publication_date.iso8601, quote: ActivityPub::TagManager.instance.uri_for(quoted_status), }, }.deep_stringify_keys @@ -77,7 +79,7 @@ 'https://www.w3.org/ns/activitystreams#Public', ], content: 'foo', - published: '2025-05-24T11:03:10Z', + published: publication_date.iso8601, quote: ActivityPub::TagManager.instance.uri_for(quoted_status), quoteAuthorization: approval_uri, }, diff --git a/yarn.lock b/yarn.lock index 600180f2f377b5..1e33d850ab9e93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2747,7 +2747,7 @@ __metadata: husky: "npm:^9.0.11" immutable: "npm:^4.3.0" intl-messageformat: "npm:^10.7.16" - js-yaml: "npm:^4.1.0" + js-yaml: "npm:^4.1.1" lande: "npm:^1.0.10" lint-staged: "npm:^16.0.0" lodash: "npm:^4.17.21" @@ -8135,8 +8135,8 @@ __metadata: linkType: hard "glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": - version: 10.4.5 - resolution: "glob@npm:10.4.5" + version: 10.5.0 + resolution: "glob@npm:10.5.0" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^3.1.2" @@ -8146,7 +8146,7 @@ __metadata: path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e + checksum: 10c0/100705eddbde6323e7b35e1d1ac28bcb58322095bd8e63a7d0bef1a2cdafe0d0f7922a981b2b48369a4f8c1b077be5c171804534c3509dfe950dde15fbe6d828 languageName: node linkType: hard @@ -9146,6 +9146,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.1": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/561c7d7088c40a9bb53cc75becbfb1df6ae49b34b5e6e5a81744b14ae8667ec564ad2527709d1a6e7d5e5fa6d483aa0f373a50ad98d42fde368ec4a190d4fae7 + languageName: node + linkType: hard + "jsdoc-type-pratt-parser@npm:~4.1.0": version: 4.1.0 resolution: "jsdoc-type-pratt-parser@npm:4.1.0"