瀏覽代碼

Update LikePipeline

Do not send notifications to self
Daniel Supernault 7 年之前
父節點
當前提交
0f8fe5d3d2
共有 1 個文件被更改,包括 4 次插入0 次删除
  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;