Browse Source

Update MentionPipeline, prevent duplicate notifications for comments/mentions

Daniel Supernault 6 năm trước cách đây
mục cha
commit
0516906183
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Jobs/MentionPipeline/MentionPipeline.php

+ 1 - 1
app/Jobs/MentionPipeline/MentionPipeline.php

@@ -50,7 +50,7 @@ class MentionPipeline implements ShouldQueue
 
         $exists = Notification::whereProfileId($target)
                   ->whereActorId($actor->id)
-                  ->whereAction('mention')
+                  ->whereIn('action', ['mention', 'comment'])
                   ->whereItemId($status->id)
                   ->whereItemType('App\Status')
                   ->count();