diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-10-10 02:57:55 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-10-10 02:57:55 -0500 |
commit | f89fd296ce59f00db47bfe85305b87aa3f3fdc00 (patch) | |
tree | 5a624577c5ea0a06da932098bc76e265d3a403aa /app | |
parent | eb4358efb766b383ae40304c23d30727d405ccc5 (diff) |
Roll back passive federation when resolving replies; do not resolve replies of silenced accounts
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 4 | ||||
-rw-r--r-- | app/services/activitypub/fetch_replies_service.rb | 5 |
2 files changed, 2 insertions, 7 deletions
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 |