2017-07-18 07:39:47 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-18 16:37:26 -07:00
|
|
|
class OStatus::Activity::Post < OStatus::Activity::Creation
|
2017-07-18 07:39:47 -07: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
|