Exclude unresolvable tickets
Ticket's Matrix rooms could be missing for whatever reason. Errors are still logged.
This commit is contained in:
parent
6f855e22c4
commit
b3619d3ae1
|
@ -50,7 +50,11 @@ class TicketService {
|
|||
|
||||
public function findAll(string $userId): array {
|
||||
$dbTickets = $this->ticketMapper->findAllForUser($this->getOrCreateUser($userId));
|
||||
return array_map(function ($ticket) { return $this->resolveTicket($ticket); }, $dbTickets);
|
||||
return array_filter(array_map(function ($ticket) {
|
||||
return $this->resolveTicket($ticket);
|
||||
}, $dbTickets), function ($resolvedTicket) {
|
||||
return $resolvedTicket['status'] !== "error";
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ export default {
|
|||
elementWebFrame.src = 'about:blank'
|
||||
elementWebFrame.onload = function() {
|
||||
const textElement = elementWebFrame.contentDocument.createElement('strong')
|
||||
textElement.innerText = 'Textchat nicht verfügbar. Es ist noch kein Helfer zugewiesen.'
|
||||
textElement.innerText = 'Textchat nicht verfügbar. Es ist noch kein(e) Helfer*in zugewiesen.'
|
||||
elementWebFrame.contentDocument.body.appendChild(textElement)
|
||||
elementWebFrame.onload = undefined
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue