|
|
|
@ -5,6 +5,7 @@ class ReblogService < BaseService
|
|
|
|
|
# @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)
|
|
|
|
@ -16,4 +17,8 @@ class ReblogService < BaseService
|
|
|
|
|
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
|
|
|
|
|