![JC Brand](/assets/img/avatar_default.png)
Add caps element to the MUC join presence, so that the MUC MEP node can know whether we're interested in receiving MEP messages. Create info messages for any `conference-info` tags that contain `activity` tags. Check for both `headline` and `normal` MEP messages (even though the XEP only show `headline` examples), since `normal` messages can be archived in MAM, but `headline` ones not. Update the XEP-0372 reference-parsing code to take the `anchor` attribute into consideration, specifically to check which text element the reference applies to. Add support for rendering XEP-0372 mentions in "info" messages and for triggering HTML5 Desktop notifications for such mentions. Background: ----------- XEP-0316 describes a way for a MUC to send out PEP-like messages to MUC participants. This feature can be used to describe custom activity happening in the MUC.
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
import { __ } from 'i18n';
|
|
import { converse } from '@converse/headless/core';
|
|
import { html } from 'lit';
|
|
|
|
const { dayjs } = converse.env;
|
|
|
|
export default (el) => {
|
|
const isodate = dayjs(el.model.get('time')).toISOString();
|
|
const i18n_retry = __('Retry');
|
|
return html`
|
|
<div class="message chat-info chat-${el.model.get('type')}"
|
|
data-isodate="${isodate}"
|
|
data-type="${el.data_name}"
|
|
data-value="${el.data_value}">
|
|
|
|
<div class="chat-info__message">
|
|
<converse-rich-text
|
|
.mentions=${el.model.get('references')}
|
|
render_styling
|
|
text=${el.model.getMessageText()}>
|
|
</converse-rich-text>
|
|
</div>
|
|
${ el.model.get('reason') ? html`<q class="reason">${el.model.get('reason')}</q>` : `` }
|
|
${ el.model.get('error_text') ? html`<q class="reason">${el.model.get('error_text')}</q>` : `` }
|
|
${ el.model.get('retry_event_id') ? html`<a class="retry" @click=${el.onRetryClicked}>${i18n_retry}</a>` : '' }
|
|
</div>`;
|
|
}
|