1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 19:33:07 +01:00

Improve set closed_at if conversation is closed after reply

This commit is contained in:
FreeScout 2020-12-16 23:37:16 -08:00
parent 74bb03f92e
commit fe694de119

View File

@ -655,8 +655,8 @@ class ConversationsController extends Controller
$prev_status = $conversation->status;
$conversation->status = $request->status;
if (Conversation::STATUS_CLOSED === $conversation->status) {
$conversation->closed_by_user_id = $request->user_id;
if ($prev_status != $conversation->status && $conversation->status == Conversation::STATUS_CLOSED) {
$conversation->closed_by_user_id = $user->id;
$conversation->closed_at = date('Y-m-d H:i:s');
}