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

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