{% import 'components/avatar.html' as avatar with context %} {% if chat_type == "group" %} {% set own_msg = msg.from_==own_local_jid %} {% else %} {% set own_msg = msg.from_|bare_jid==own_local_jid|bare_jid %} {% endif %}
{%- if msg.type != "info" %} {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%}
{{ avatar.avatar(msg.from_) }}
{% endif -%}
{%- if msg.type != "info" %}
{{author}} {{(msg.extra.updated or msg.timestamp)|date_fmt('short', tz_name=tz_name)}} {% if msg.reply_to or msg.extra.thread %} {{ icon('comment-dots', cls='icon is-small message-thread') }} {% endif %} {% if msg.extra.editions %} {{ icon('pencil', cls='icon is-small message-editions') }} {% endif %} {% if msg.encrypted %} {{ icon('lock-filled', cls='icon is-small has-text-success') }} {% else %} {{ icon('lock-open', cls='icon is-small has-text-danger') }} {% endif %} {% if msg.received %} {{ icon('ok', cls='icon is-small has-text-link') }} {% endif %} {% if msg.edited %} {{ icon('pencil', cls='icon is-small has-text-info') }} {% endif %}
{% endif -%}

{%- if msg.extra.retracted %} {% trans %}This message has been retracted.{% endtrans %} {% else %} {{- msg.html or (msg.text|e|urlize|safe) -}} {% endif -%}

{# {{ icon('share-nodes', cls='icon is-small action-button', id='msg_share_' + msg.id) }} #} {{ icon('reply', cls='icon is-small action-button reply-button')}} {{ icon('regular face-smile', cls='icon is-small action-button reaction-button') }} {{ icon('ellipsis', cls='icon is-small action-button extra-button') }}
{% if msg.extra.reactions is defined %} {% set reactions = msg.extra.get("reactions") %} {% include 'components/reactions.html' %} {% endif %}
{% if msg.attachments %}
{%- for attachment in msg.attachments %}
{%- if not attachment.url -%}
{% trans name=attachment.name %}Attachment: {{name}}{% endtrans %}
{% trans %}Cannot be opened as there are no sources available.{% endtrans %}
{%- else -%} {%- if attachment.media_type|media_type_main == 'image' %} {{attachment.name}} {%- else %} {{ icon('doc', cls='icon') }} {%- endif %}
{{attachment.name}}
{%- endif -%}
{%- endfor %}
{% endif %}