]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #4917 - Add missing suspend checks (#4921)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 13 Sep 2017 09:05:02 +0000 (11:05 +0200)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2017 09:05:02 +0000 (11:05 +0200)
app/services/activitypub/fetch_remote_status_service.rb
app/services/activitypub/process_collection_service.rb

index 68ca58d629d5d90a745aaa5714a401d66429791b..a95931afe0702ccb6ec82ab8b8a306adc5cd9088 100644 (file)
@@ -17,6 +17,8 @@ class ActivityPub::FetchRemoteStatusService < BaseService
     actor = ActivityPub::TagManager.instance.uri_to_resource(actor_id, Account)
     actor = ActivityPub::FetchRemoteAccountService.new.call(actor_id) if actor.nil?
 
+    return if actor.suspended?
+
     ActivityPub::Activity.factory(activity, actor).perform
   end
 
index bc04c50ba127c6bb36dff8862de575b7e9142d41..0c6736a3fdd4ebde8fff232fdbc8f99af9aa11cf 100644 (file)
@@ -7,9 +7,9 @@ class ActivityPub::ProcessCollectionService < BaseService
     @account = account
     @json    = Oj.load(body, mode: :strict)
 
-    return if @account.suspended? || !supported_context?
-
+    return unless supported_context?
     return if different_actor? && verify_account!.nil?
+    return if @account.suspended?
 
     case @json['type']
     when 'Collection', 'CollectionPage'