Search user messages WIP (#145)

This commit is contained in:
John Livingston
2024-08-01 18:58:25 +02:00
parent dd03075831
commit 4181661faf
13 changed files with 308 additions and 64 deletions

View File

@ -95,6 +95,18 @@ async function query (options) {
return { messages }
}
export default {
query
async function showMessagesFrom (occupant) {
const appElement = document.querySelector('livechat-converse-muc-mam-search-app')
if (!appElement) {
throw new Error('Cant find Search App Element')
}
appElement.searchFrom(occupant)
await appElement.showApp()
await appElement.updateComplete // waiting for the app to be open
return appElement
}
export default {
query,
showMessagesFrom
}