1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 11:52:29 +01:00
freescout/app/Listeners/SendReplyToCustomer.php
2018-09-20 01:13:33 -07:00

34 lines
746 B
PHP

<?php
namespace App\Listeners;
use App\Conversation;
class SendReplyToCustomer
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*/
public function handle($event)
{
$conversation = $event->conversation;
// We can not check imported here, as after conversation has been imported via API
// notifications has to be sent.
//if (!$conversation->imported) {
\App\Jobs\SendReplyToCustomer::dispatch($conversation, $conversation->getReplies(), $conversation->customer)
->delay(now()->addSeconds(Conversation::UNDO_TIMOUT))
->onQueue('emails');
}
}