Support Actors/Statuses with multiple types (#7305)
* Add equals_or_includes_any? helper in JsonLdHelper * Support arrays in JSON-LD type fields for actors/tags/objects. * Spec for resolving accounts with extension types * Style tweaks for codeclimate
This commit is contained in:
committed by
Eugen Rochko
parent
86efccce2a
commit
dc786c0cf4
@ -16,10 +16,9 @@ class ResolveURLService < BaseService
|
||||
private
|
||||
|
||||
def process_url
|
||||
case type
|
||||
when 'Application', 'Group', 'Organization', 'Person', 'Service'
|
||||
if equals_or_includes_any?(type, %w(Application Group Organization Person Service))
|
||||
FetchRemoteAccountService.new.call(atom_url, body, protocol)
|
||||
when 'Note', 'Article', 'Image', 'Video'
|
||||
elsif equals_or_includes_any?(type, %w(Note Article Image Video))
|
||||
FetchRemoteStatusService.new.call(atom_url, body, protocol)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user