forked from cybrespace/mastodon
		
	Accept actor object updates from all supported actor types (#7312)
This commit is contained in:
		
							parent
							
								
									cae933510c
								
							
						
					
					
						commit
						d0cdd5cf94
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -1,8 +1,10 @@
 | 
				
			||||||
# frozen_string_literal: true
 | 
					# frozen_string_literal: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ActivityPub::Activity::Update < ActivityPub::Activity
 | 
					class ActivityPub::Activity::Update < ActivityPub::Activity
 | 
				
			||||||
 | 
					  SUPPORTED_TYPES = %w(Application Group Organization Person Service).freeze
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def perform
 | 
					  def perform
 | 
				
			||||||
    update_account if equals_or_includes?(@object['type'], 'Person')
 | 
					    update_account if equals_or_includes_any?(@object['type'], SUPPORTED_TYPES)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private
 | 
					  private
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue