about summary refs log tree commit diff
path: root/app/lib/ostatus/activity/post.rb
blob: 755ed865639a5663da4b5a5737d57ef44b02f75b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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