diff options
author | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-18 18:59:00 +0200 |
---|---|---|
committer | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-18 18:59:00 +0200 |
commit | df74e26baf3c639d0419a7b809208636e81d93f3 (patch) | |
tree | ef0462e5fcc8cc7962ef42d80f7dd520a574a7c5 /app/lib/ostatus/activity/post.rb | |
parent | c727eae4412ac9e4f1bafdc68fe89dcd46d602ca (diff) | |
parent | d69fa9e1f40124279ec9d772e5f54d1e11724e2d (diff) |
Merge branch 'tootsuite-master'
Diffstat (limited to 'app/lib/ostatus/activity/post.rb')
-rw-r--r-- | app/lib/ostatus/activity/post.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/lib/ostatus/activity/post.rb b/app/lib/ostatus/activity/post.rb new file mode 100644 index 000000000..8028db2f8 --- /dev/null +++ b/app/lib/ostatus/activity/post.rb @@ -0,0 +1,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 |