1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 03:43:33 +01:00
freescout/app/Observers/SendLogObserver.php
2018-11-12 09:12:57 +00:00

21 lines
494 B
PHP

<?php
namespace App\Observers;
class SendLogObserver
{
/**
* Send log created.
*
* @param SendLog $send_log
*/
public function created(SendLog $send_log)
{
// Update status for thread if any
if ($send_log->thread_id && ($send_log->customer_id || ($send_log->user_id && $send_log->user_id == $send_log->thread->user_id))) {
$send_log->thread->send_status = $send_log->status;
$send_log->thread->save();
}
}
}