2024-08-01 16:58:25 +00:00
|
|
|
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import { CustomElement } from 'shared/components/element.js'
|
|
|
|
import { tplMucMamSearchOccupant } from '../templates/muc-mam-search-occupant'
|
|
|
|
import { api } from '@converse/headless'
|
|
|
|
|
|
|
|
import '../styles/muc-mam-search-occupant.scss'
|
|
|
|
|
|
|
|
export default class MUCMamSearchOccupantView extends CustomElement {
|
|
|
|
static get properties () {
|
|
|
|
return {
|
2024-08-06 15:54:07 +00:00
|
|
|
model: { type: Object, attribute: true },
|
|
|
|
message: { type: Object, attribute: true } // optional message.
|
2024-08-01 16:58:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async initialize () {
|
|
|
|
this.listenTo(this.model, 'change', () => this.requestUpdate())
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2024-08-06 15:54:07 +00:00
|
|
|
return tplMucMamSearchOccupant(this, this.model, this.message)
|
2024-08-01 16:58:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
api.elements.define('livechat-converse-muc-mam-search-occupant', MUCMamSearchOccupantView)
|