Fixed e-mail reply polling (#1154)

This commit is contained in:
Nícolas Castillo 2022-02-21 12:12:04 -05:00 committed by GitHub
parent 54a5a9803d
commit 784d470ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -83,9 +83,12 @@ class EmailPollingController extends Controller {
try { try {
if($email->isReply()) { if($email->isReply()) {
if($email->getTicket()->authorToArray()['email'] === $email->getSender()) { $ticketAuthor = $email->getTicket()->authorToArray();
if($ticketAuthor['email'] === $email->getSender()) {
$session->clearSessionData(); $session->clearSessionData();
$session->createTicketSession($email->getTicket()->ticketNumber); $session->createSession($ticketAuthor['id'],
$ticketAuthor['staff'],
$email->getTicket()->ticketNumber);
$commentController->handler(); $commentController->handler();
} }