diff --git a/lib/Service/TicketService.php b/lib/Service/TicketService.php index 4cb4806..80843a1 100644 --- a/lib/Service/TicketService.php +++ b/lib/Service/TicketService.php @@ -81,6 +81,7 @@ class TicketService { } /** + * matrixTicketContent has all the syncronized data * @param MatrixTicket $ticket the database object. * @return array a JSON serializable representation of the resolved ticket, for the frontend. */ @@ -92,11 +93,8 @@ class TicketService { $title = array_get($matrixTicketContent, "title", "Untitled"); $description = array_get($matrixTicketContent, "description", ""); $lastModified = $this->matrix->getLastEventDate($ticket->getMatrixRoom()); - $matrixHelperUser = $ticket->getMatrixHelperUser(); - $matrixHelperUserName = $matrixHelperUser ? "Helfer Name" : "nicht zugewiesen"; - //FIXME : set $maxHelpTime somewhere as an option or at least available for other functions - $maxHelpTime = 7 * 24 * 60 * 60 * 1000; - $expirationDate = $lastModified + $maxHelpTime; + $matrixHelperUserName = array_get($matrixTicketContent, "matrixHelperUserName", "nicht zugewiesen"); + $expirationDate = array_get($matrixTicketContent, "expiration date", ""); return array( 'ticketId' => $ticketId, 'status' => $ticket->getStatus(),