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