Explorar o código

Update LikePipeline

Do not send notifications to self
Daniel Supernault %!s(int64=7) %!d(string=hai) anos
pai
achega
0f8fe5d3d2
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Jobs/LikePipeline/LikePipeline.php

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

@@ -37,6 +37,10 @@ class LikePipeline implements ShouldQueue
         $status = $this->like->status;
         $actor = $this->like->actor;
 
+        if($actor->id === $status->profile_id) {
+            return true;
+        }
+
         try {
 
             $notification = new Notification;