mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-25 19:52:41 +00:00
Fix getting Create and Update out of order (#36176)
This commit is contained in:
parent
8ddb8382f4
commit
444cf4cc40
2 changed files with 74 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ class ActivityPub::Activity::Update < ActivityPub::Activity
|
|||
|
||||
@status = Status.find_by(uri: object_uri, account_id: @account.id)
|
||||
|
||||
# We may be getting `Create` and `Update` out of order
|
||||
@status ||= ActivityPub::Activity::Create.new(@json, @account, **@options).perform
|
||||
|
||||
return if @status.nil?
|
||||
|
||||
ActivityPub::ProcessStatusUpdateService.new.call(@status, @json, @object, request_id: @options[:request_id])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue