2017-07-18 17:39:47 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-19 02:37:26 +03:00
|
|
|
class OStatus::Activity::Post < OStatus::Activity::Creation
|
2017-07-18 17:39:47 +03:00
|
|
|
def perform
|
|
|
|
status, just_created = super
|
|
|
|
|
|
|
|
if just_created
|
|
|
|
status.mentions.includes(:account).each do |mention|
|
|
|
|
mentioned_account = mention.account
|
|
|
|
next unless mentioned_account.local?
|
|
|
|
NotifyService.new.call(mentioned_account, mention)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
status
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def reblog
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|