Преглед на файлове

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();