gearheads
/
mastodon
Archived
2
0
Fork 0

Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged (#18424)

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

* Replace to `@object`
gh/stable
Yamagishi Kazutoshi 2022-05-16 08:00:09 +09:00 committed by GitHub
parent 95a036c598
commit c3fac61f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
def perform def perform
return reject_payload! if delete_arrived_first?(@json['id']) || !related_to_local_activity? 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 original_status = status_from_object
return reject_payload! if original_status.nil? || !announceable?(original_status) return reject_payload! if original_status.nil? || !announceable?(original_status)