Support all ActivityPub actor types (#6997)

Fix #6973
This commit is contained in:
Eugen Rochko
2018-04-02 02:10:53 +02:00
committed by GitHub
parent 33513753b9
commit f890d2a766
5 changed files with 8 additions and 6 deletions

View File

@@ -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