Class: Fediverse::Notifier
- Inherits:
-
Object
- Object
- Fediverse::Notifier
- Defined in:
- lib/fediverse/notifier.rb
Class Method Summary collapse
-
.post_to_inboxes(activity) ⇒ Object
Posts an activity to its recipients.
Class Method Details
.post_to_inboxes(activity) ⇒ Object
Posts an activity to its recipients
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fediverse/notifier.rb', line 9 def post_to_inboxes(activity) actors = activity.recipients Rails.logger.debug('Nobody to notice') && return if actors.count.zero? = payload(activity) actors.each do |recipient| Rails.logger.debug { "Sending activity ##{activity.id} to #{recipient.inbox_url}" } post_to_inbox(to: recipient, message: , from: activity.actor) end end |