diff --git a/app/Http/Controllers/Admin/TicketController.php b/app/Http/Controllers/Admin/TicketController.php index b98418b3..a660ab74 100644 --- a/app/Http/Controllers/Admin/TicketController.php +++ b/app/Http/Controllers/Admin/TicketController.php @@ -20,7 +20,7 @@ class TicketController extends Controller } $ticket['message'] = TicketMessage::where('ticket_id', $ticket->id)->get(); for ($i = 0; $i < count($ticket['message']); $i++) { - if ($ticket['message'][$i]['user_id'] == $request->session()->get('id')) { + if ($ticket['message'][$i]['user_id'] !== $ticket->user_id) { $ticket['message'][$i]['is_me'] = true; } else { $ticket['message'][$i]['is_me'] = false; diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index 20624d9d..37f6c6a1 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -22,7 +22,7 @@ class TicketController extends Controller } $ticket['message'] = TicketMessage::where('ticket_id', $ticket->id)->get(); for ($i = 0; $i < count($ticket['message']); $i++) { - if ($ticket['message'][$i]['user_id'] == $request->session()->get('id')) { + if ($ticket['message'][$i]['user_id'] == $ticket->user_id) { $ticket['message'][$i]['is_me'] = true; } else { $ticket['message'][$i]['is_me'] = false;