Explorar o código

Update CommentPipeline, do not send notifications for self comments

Daniel Supernault %!s(int64=7) %!d(string=hai) anos
pai
achega
f64cf90dda
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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;