Module: Fedipub::Announceable

Extended by:
ActiveSupport::Concern
Included in:
Actor, DataEntity
Defined in:
app/models/concerns/fedipub/announceable.rb

Instance Method Summary collapse

Instance Method Details

#announce!(actor: nil) ⇒ Fedipub::Activity

Announces (boosts) this entity by creating a new Activity.

Parameters:

  • actor (Fedipub::Actor) (defaults to: nil)

    The actor doing the announce; defaults to the entity's own actor.

Returns:



10
11
12
13
14
15
16
# File 'app/models/concerns/fedipub/announceable.rb', line 10

def announce!(actor: nil)
  actor ||= try(:fedipub_actor) || self
  create_fedipub_activity('Announce',
                          actor: actor,
                          to:    [Fediverse::Collection::PUBLIC],
                          cc:    [actor.followers_url])
end