about summary refs log tree commit diff
path: root/app/lib/activitypub/activity/update.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/activitypub/activity/update.rb')
-rw-r--r--app/lib/activitypub/activity/update.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/update.rb b/app/lib/activitypub/activity/update.rb
new file mode 100644
index 000000000..0134b4015
--- /dev/null
+++ b/app/lib/activitypub/activity/update.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class ActivityPub::Activity::Update < ActivityPub::Activity
+  def perform
+    case @object['type']
+    when 'Person'
+      update_account
+    end
+  end
+
+  private
+
+  def update_account
+    return if @account.uri != object_uri
+    ActivityPub::ProcessAccountService.new.call(@account.username, @account.domain, @object)
+  end
+end