]> _ Git - psq.git/commitdiff
Update DispatchMailgunEvent.php
authorLouis Jeckel <louis.jeckel@outlook.cm>
Mon, 7 Sep 2020 07:59:07 +0000 (09:59 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Mon, 7 Sep 2020 07:59:07 +0000 (09:59 +0200)
app/Events/DispatchMailgunEvent.php

index 89148bbce5d8100690fca6e0ce254d0011a73e6f..2ef445cd402f77c30693accf37e01e4b4b7bd283 100644 (file)
@@ -47,10 +47,10 @@ class DispatchMailgunEvent implements ShouldBroadcast
             return Str::startsWith($tag, 'batch_id_');
         }), 'batch_id_');
 
-        if(! EmailBatch::query()->find($this->batch_id)->exists()) {
+        if(EmailBatch::query()->find($this->batch_id) === null) {
             abort(406);
         }
-        
+
         $event = MailgunEvent::updateOrCreate([
             'event' => Arr::get($webhookData, 'event-data.event'),
             'recipient' => Arr::get($webhookData, 'event-data.recipient'),