Class: Federails::Utils::Actor

Inherits:
Object
  • Object
show all
Defined in:
lib/federails/utils/actor.rb

Constant Summary collapse

COMPUTED_ATTRIBUTES =

List of the attributes computed for local actors

[
  :federated_url,
  :username,
  :name,
  :server,
  :inbox_url,
  :outbox_url,
  :followers_url,
  :followings_url,
  :profile_url,
].freeze

Class Method Summary collapse

Class Method Details

.tombstone!(actor) ⇒ Federails::Actor

Parameters:

Returns:



20
21
22
23
24
25
26
27
28
# File 'lib/federails/utils/actor.rb', line 20

def tombstone!(actor)
  if actor.local?
    tombstone_local_actor actor
  else
    tombstone_distant_actor actor
  end

  actor
end

.untombstone!(actor) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/federails/utils/actor.rb', line 30

def untombstone!(actor)
  if actor.local?
    untombstone_local_actor actor
  else
    untombstone_distant_actor actor
  end
end