about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2022-05-16 08:00:09 +0900
committerGitHub <noreply@github.com>2022-05-16 01:00:09 +0200
commitc3fac61f56b3ad63534961f3d3c426cdf8ac6213 (patch)
tree868cbdc32e9e7362ccd42822ac8d1d0b044537e5 /app
parent95a036c598f54db673e5b4933cc92565ab198efc (diff)
Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged (#18424)
* Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged

* Replace to `@object`
Diffstat (limited to 'app')
-rw-r--r--app/lib/activitypub/activity/announce.rb2
1 files changed, 1 insertions, 1 deletions
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)