|
@ -7,7 +7,7 @@ class PostStatusService < BaseService |
|
|
def call(account, text, in_reply_to = nil) |
|
|
def call(account, text, in_reply_to = nil) |
|
|
status = account.statuses.create!(text: text, thread: in_reply_to) |
|
|
status = account.statuses.create!(text: text, thread: in_reply_to) |
|
|
process_mentions_service.(status) |
|
|
process_mentions_service.(status) |
|
|
fan_out_on_write_service.(status) |
|
|
|
|
|
|
|
|
DistributionWorker.perform_async(status.id) |
|
|
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]) |
|
|
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]) |
|
|
status |
|
|
status |
|
|
end |
|
|
end |
|
@ -17,8 +17,4 @@ class PostStatusService < BaseService |
|
|
def process_mentions_service |
|
|
def process_mentions_service |
|
|
@process_mentions_service ||= ProcessMentionsService.new |
|
|
@process_mentions_service ||= ProcessMentionsService.new |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def fan_out_on_write_service |
|
|
|
|
|
@fan_out_on_write_service ||= FanOutOnWriteService.new |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
end |