You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
445 B
24 lines
445 B
7 years ago
|
# frozen_string_literal: true
|
||
|
|
||
|
class Ostatus::Activity::Post < Ostatus::Activity::Creation
|
||
|
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
|