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
				
			@@ -42,7 +42,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def expected_type?
 | 
			
		||||
    (ActivityPub::Activity::Create::SUPPORTED_TYPES + ActivityPub::Activity::Create::CONVERTED_TYPES).include? @json['type']
 | 
			
		||||
    equals_or_includes_any?(@json['type'], ActivityPub::Activity::Create::SUPPORTED_TYPES + ActivityPub::Activity::Create::CONVERTED_TYPES)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def needs_update(actor)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user