Sfoglia il codice sorgente

Update LikePipeline

Do not send notifications to self
Daniel Supernault 7 anni fa
parent
commit
0f8fe5d3d2
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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;