浏览代码

Update CommentPipeline, do not send notifications for self comments

Daniel Supernault 7 年之前
父节点
当前提交
f64cf90dda
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/Jobs/CommentPipeline/CommentPipeline.php

+ 4 - 0
app/Jobs/CommentPipeline/CommentPipeline.php

@@ -42,6 +42,10 @@ class CommentPipeline implements ShouldQueue
         $target = $status->profile;
         $actor = $comment->profile;
 
+        if($actor->id === $target->id) {
+            return true;
+        }
+
         try {
 
             $notification = new Notification;