From f89fd296ce59f00db47bfe85305b87aa3f3fdc00 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 10 Oct 2020 02:57:55 -0500 Subject: Roll back passive federation when resolving replies; do not resolve replies of silenced accounts --- app/lib/activitypub/activity/create.rb | 4 ++-- app/services/activitypub/fetch_replies_service.rb | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index f6d81af99..cc585eb10 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -91,7 +91,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity @status = UpdateStatusService.new.call(@status, @params, @mentions, @tags) resolve_thread(@status) - fetch_replies(@status) + fetch_replies(@status) unless @account.silenced? return @status end @@ -106,7 +106,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity end resolve_thread(@status) - fetch_replies(@status) + fetch_replies(@status) unless @account.silenced? check_for_spam distribute(@status) forward_for_reply diff --git a/app/services/activitypub/fetch_replies_service.rb b/app/services/activitypub/fetch_replies_service.rb index e113e4937..e36ca9f39 100644 --- a/app/services/activitypub/fetch_replies_service.rb +++ b/app/services/activitypub/fetch_replies_service.rb @@ -3,12 +3,7 @@ class ActivityPub::FetchRepliesService < BaseService def call(parent_status, collection, **options) @account = parent_status.account - return if @account.suspended? - fetch_collection_items(collection, **options) - return if (collection.is_a?(String) && collection == @account.outbox_url) || @account.local? || @account.silenced? || @account.passive_relationships.exists? || !@account.active_relationships.exists? - - fetch_collection_items(@account.outbox_url, **options) rescue ActiveRecord::RecordNotFound nil end -- cgit