Explorar o código

Update MentionPipeline, prevent duplicate notifications for comments/mentions

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
0516906183
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();