1
0
Fork 0
forked from mirror/pixelfed

Update ContactPipeline

This commit is contained in:
Daniel Supernault 2019-06-18 18:49:08 -06:00
parent 50371bf349
commit 1bb3e0344b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -35,10 +35,10 @@ class ContactPipeline implements ShouldQueue
public function handle()
{
$contact = $this->contact;
if(config('instance.contact.enabled') == false || $this->read_at !== null) {
$email = config('instance.email');
if(config('instance.contact.enabled') == false || $contact->read_at !== null || filter_var($email, FILTER_VALIDATE_EMAIL) == false) {
return;
}
$email = config('instance.email');
Mail::to($email)->send(new ContactAdmin($contact));
}
}