Browse Source

Update MentionPipeline, prevent duplicate notifications for comments/mentions

Daniel Supernault 6 years ago
parent
commit
0516906183
1 changed files with 1 additions and 1 deletions
  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();