This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-08-08 21:52:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::Activity::Update < ActivityPub::Activity
|
|
|
|
def perform
|
2018-05-02 12:40:24 +02:00
|
|
|
update_account if equals_or_includes?(@object['type'], 'Person')
|
2017-08-08 21:52:15 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def update_account
|
|
|
|
return if @account.uri != object_uri
|
|
|
|
ActivityPub::ProcessAccountService.new.call(@account.username, @account.domain, @object)
|
|
|
|
end
|
|
|
|
end
|