From c3fac61f56b3ad63534961f3d3c426cdf8ac6213 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Mon, 16 May 2022 08:00:09 +0900 Subject: Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged (#18424) * Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged * Replace to `@object` --- app/lib/activitypub/activity/announce.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/lib/activitypub/activity/announce.rb b/app/lib/activitypub/activity/announce.rb index 0032f13e6..e6674be8a 100644 --- a/app/lib/activitypub/activity/announce.rb +++ b/app/lib/activitypub/activity/announce.rb @@ -4,7 +4,7 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity def perform return reject_payload! if delete_arrived_first?(@json['id']) || !related_to_local_activity? - with_lock("announce:#{@object['id']}") do + with_lock("announce:#{value_or_id(@object)}") do original_status = status_from_object return reject_payload! if original_status.nil? || !announceable?(original_status) -- cgit