Compare commits

...

2 commits

Author SHA1 Message Date
Ben 95481a289b
Fix query for current MatrixChat for ticket 2022-04-30 16:03:39 +02:00
Ben 037b95aded
Remove left panel by DOM manipulation 2022-04-30 15:39:20 +02:00
2 changed files with 14 additions and 1 deletions

View file

@ -44,7 +44,7 @@ class ChatMapper extends QBMapper
->from('upschooling_chats')
->where(
$qb->expr()->eq('ticket_id', $qb->createNamedParameter($ticketId, IQueryBuilder::PARAM_INT)),
$qb->expr()->isNull('end_date')
$qb->expr()->isNull('date_end')
);
return $this->findEntity($qb);
}

View file

@ -134,7 +134,20 @@ export default {
elementWebFrame.contentWindow.mxDispatcher.dispatch({
action: 'view_room',
room_id: matrixInfoResponse.data.matrixChatRoom,
}, true)
// removes left panel by DOM manipulation
const matrixchat = elementWebFrame.contentDocument.getElementById('matrixchat')
console.debug(matrixchat)
const observerConfig = { attributes: false, childList: true, subtree: true }
const observer = new MutationObserver((mutationsList, observer) => {
console.debug('observer kicked', observer)
const leftPanelsByClass = elementWebFrame.contentDocument.getElementsByClassName('mx_LeftPanel_outerWrapper')
for (const leftPanel of leftPanelsByClass) {
leftPanel.remove()
}
})
observer.observe(matrixchat, observerConfig)
}).catch(console.error)
},
},