Преглед изворни кода

Update MentionPipeline, prevent duplicate notifications for comments/mentions

Daniel Supernault пре 6 година
родитељ
комит
0516906183
1 измењених фајлова са 1 додато и 1 уклоњено
  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();