Serialize ActivityPub alternate link into OStatus deletes, handle it (#4730)
Requires moving Atom rendering from DistributionWorker (where `stream_entry.status` is already nil) to inline (where `stream_entry.status.destroyed?` is true) and distributing that. Unfortunately, such XML renderings can no longer be easily chained together into one payload of n items.
This commit is contained in:
parent
9958eba356
commit
4c76402ba1
7 changed files with 57 additions and 20 deletions
|
@ -3,7 +3,9 @@
|
|||
class OStatus::Activity::Deletion < OStatus::Activity::Base
|
||||
def perform
|
||||
Rails.logger.debug "Deleting remote status #{id}"
|
||||
status = Status.find_by(uri: id, account: @account)
|
||||
|
||||
status = Status.find_by(uri: id, account: @account)
|
||||
status ||= Status.find_by(uri: activitypub_uri, account: @account) if activitypub_uri?
|
||||
|
||||
if status.nil?
|
||||
redis.setex("delete_upon_arrival:#{@account.id}:#{id}", 6 * 3_600, id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue