소스 검색

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;