From f890d2a766ae4c7fd8611dd4f3a15a13408f68c3 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 2 Apr 2018 02:10:53 +0200 Subject: Support all ActivityPub actor types (#6997) Fix #6973 --- app/services/activitypub/fetch_remote_account_service.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/services/activitypub/fetch_remote_account_service.rb') diff --git a/app/services/activitypub/fetch_remote_account_service.rb b/app/services/activitypub/fetch_remote_account_service.rb index d6ba625a9..5024853ca 100644 --- a/app/services/activitypub/fetch_remote_account_service.rb +++ b/app/services/activitypub/fetch_remote_account_service.rb @@ -3,6 +3,8 @@ class ActivityPub::FetchRemoteAccountService < BaseService include JsonLdHelper + SUPPORTED_TYPES = %w(Application Group Organization Person Service).freeze + # Should be called when uri has already been checked for locality # Does a WebFinger roundtrip on each call def call(uri, id: true, prefetched_body: nil) @@ -54,6 +56,6 @@ class ActivityPub::FetchRemoteAccountService < BaseService end def expected_type? - @json['type'] == 'Person' + SUPPORTED_TYPES.include?(@json['type']) end end -- cgit