]> cat aescling's git repositories - mastodon.git/commitdiff
Accept actor object updates from all supported actor types (#7312)
authorThibG <thib@sitedethib.com>
Wed, 2 May 2018 14:08:16 +0000 (16:08 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 2 May 2018 14:08:16 +0000 (16:08 +0200)
app/lib/activitypub/activity/update.rb

index 47e98e04192b9bb267346b03dc66637c7ac768e1..aa5907f033d5951fdee091af9137a28c3f8dc25e 100644 (file)
@@ -1,8 +1,10 @@
 # frozen_string_literal: true
 
 class ActivityPub::Activity::Update < ActivityPub::Activity
+  SUPPORTED_TYPES = %w(Application Group Organization Person Service).freeze
+
   def perform
-    update_account if equals_or_includes?(@object['type'], 'Person')
+    update_account if equals_or_includes_any?(@object['type'], SUPPORTED_TYPES)
   end
 
   private