after_create do
self.account.stream_entries.create!(activity: self)
- FanOutOnWriteService.new.(self)
end
end
def call(account, text, in_reply_to = nil)
status = account.statuses.create!(text: text, thread: in_reply_to)
process_mentions_service.(status)
+ fan_out_on_write_service.(status)
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
status
end
def process_mentions_service
@process_mentions_service ||= ProcessMentionsService.new
end
+
+ def fan_out_on_write_service
+ @fan_out_on_write_service ||= FanOutOnWriteService.new
+ end
end
end
end
end
+
+
+ fan_out_on_write_service.(status)
end
end
end
def update_remote_profile_service
@update_remote_profile_service ||= UpdateRemoteProfileService.new
end
+
+ def fan_out_on_write_service
+ @fan_out_on_write_service ||= FanOutOnWriteService.new
+ end
end
# @return [Status]
def call(account, reblogged_status)
reblog = account.statuses.create!(reblog: reblogged_status, text: '')
+ fan_out_on_write_service.(reblog)
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
return reblog if reblogged_status.local?
send_interaction_service.(reblog.stream_entry, reblogged_status.account)
def send_interaction_service
@send_interaction_service ||= SendInteractionService.new
end
+
+ def fan_out_on_write_service
+ @fan_out_on_write_service ||= FanOutOnWriteService.new
+ end
end