added expiration date and helper to resolveTicket
This commit is contained in:
parent
23e4f0c974
commit
6de894487c
|
@ -79,12 +79,20 @@ 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;
|
||||
return array(
|
||||
'ticketId' => $ticketId,
|
||||
'status' => $ticket->getStatus(),
|
||||
'lastModified' => $lastModified,
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'matrixHelperUser' => $matrixHelperUser,
|
||||
'matrixHelferName' => $matrixHelperUserName,
|
||||
'expirationDate' => $expirationDate
|
||||
);
|
||||
} catch (MatrixException | RoomNotFoundException $e) {
|
||||
return array(
|
||||
|
|
Loading…
Reference in a new issue