Skip to content

Commit

Permalink
Fix Mastodon::RaceConditionError that occurs when external status i…
Browse files Browse the repository at this point in the history
…s reblogged (mastodon#18424)

* Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged

* Replace to `@object`
  • Loading branch information
ykzts authored May 15, 2022
1 parent 95a036c commit c3fac61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/announce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3fac61

Please sign in to comment.