{% import 'components/avatar.html' as avatar with context %} {% if chat_type == "group" %} {% set own_msg = msg.from_==own_jid %} {% else %} {% set own_msg = msg.from_|bare_jid==own_jid|bare_jid %} {% endif %}
{%- if msg.type != "info" %} {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%}
{{ avatar.avatar(msg.from_, "is-32x32") }}
{% endif -%}
{%- if msg.type != "info" %} {% endif -%}

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

{#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} {{ icon('smile', cls='icon is-small action-button reaction-button', id='msg_actions_{{msg.id}}') }} {{ icon('dot-3', cls='icon is-small action-button extra-button', id='msg_actions_{{msg.id}}') }}
{% if msg.extra.reactions is defined %} {% set reactions = msg.extra.get("reactions") %} {% include 'chat/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 %}