From 4dfc40324b1f3b20550982621501e162d2ed3bed Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 8 Aug 2019 09:59:14 -0500 Subject: add new `reject unknown` policy option to prevent spam & harassment from large/undermoderated servers --- app/services/activitypub/fetch_remote_status_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/services/activitypub/fetch_remote_status_service.rb') diff --git a/app/services/activitypub/fetch_remote_status_service.rb b/app/services/activitypub/fetch_remote_status_service.rb index 42280ad74..423c7bc9a 100644 --- a/app/services/activitypub/fetch_remote_status_service.rb +++ b/app/services/activitypub/fetch_remote_status_service.rb @@ -5,7 +5,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService include AutorejectHelper # Should be called when uri has already been checked for locality - def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil) + def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil, announced_by: nil, requested: false) return if autoreject?(uri) @json = if prefetched_body.nil? @@ -24,7 +24,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService return if actor.nil? || actor.suspended? - ActivityPub::Activity.factory(activity_json, actor).perform + ActivityPub::Activity.factory(activity_json, actor, announced_by: announced_by, requested: requested).perform end private -- cgit