From 75b1488cf4dfe54260deff8df20e5e9b9fd90aea Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 18 Jan 2019 15:56:55 +0100 Subject: Add tombstones for remote statuses (#9830) * Add Tombstone model to remember object deletion * Do not recreate a status if it has been deleted * Record Tombstone for remote deleted items Also, only record deleted items from same-host actors * Clear an user's tombstones when their key change --- app/lib/activitypub/activity/create.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/lib/activitypub/activity/create.rb') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 665a9fbdc..b49657d4b 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -6,6 +6,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity def perform return if unsupported_object_type? || invalid_origin?(@object['id']) + return if Tombstone.exists?(uri: @object['id']) RedisLock.acquire(lock_options) do |lock| if lock.acquired? -- cgit