{% 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', cls='icon is-small has-text-success') }} {% else %} {{ icon('unlock', cls='icon is-small has-text-danger') }} {% endif %} {% if msg.received %} {{ icon('check', cls='icon is-small has-text-link') }} {% endif %} {% if msg.edited %} {{ icon('pencil', cls='icon is-small has-text-info') }} {% endif %}
{% if msg.extra.origin or msg.extra.get("is-bot") %}
{% if msg.extra.origin == "smtp" %} 🖂 {% trans %}email{% endtrans %} {% else %} {{msg.extra.origin}} {% endif %} {% if msg.extra.get("is-bot") %} 🤖 bot {% endif %}
{% endif %} {% endif -%}

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

{% 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 %}