Search user messages WIP (#145)
This commit is contained in:
@ -0,0 +1,31 @@
|
||||
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { html } from 'lit'
|
||||
|
||||
/**
|
||||
* Renders the message as a search result.
|
||||
* @param el The message element
|
||||
* @param mucModel The MUC model
|
||||
* @param searchOccupantModel The model of the occupant for which we are searching
|
||||
* @param message The message (warning: this is not a model)
|
||||
* @returns TemplateResult (or equivalent)
|
||||
*/
|
||||
export function tplMucMamSearchMessage (el, mucModel, searchOccupantModel, message) {
|
||||
const occupant = el.getMessageOccupant()
|
||||
return html`
|
||||
${
|
||||
occupant
|
||||
? html`
|
||||
<livechat-converse-muc-mam-search-occupant
|
||||
.model=${occupant}
|
||||
></livechat-converse-muc-mam-search-occupant>`
|
||||
: ''
|
||||
}
|
||||
<converse-rich-text
|
||||
render_styling
|
||||
text=${message.body}>
|
||||
</converse-rich-text>
|
||||
<div class="livechat-message-date">${el.getDateTime()}</div>`
|
||||
}
|
Reference in New Issue
Block a user