This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-07-18 16:39:47 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-19 01:37:26 +02:00
|
|
|
class OStatus::Activity::Post < OStatus::Activity::Creation
|
2017-07-18 16:39:47 +02: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
|