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

{{- msg.html or (msg.text|e|urlize|safe) -}}

{#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} {{ icon('dot-3', cls='icon is-small action-button', id='msg_actions_{{msg.id}}') }}
{% if msg.attachments %}
{%- for attachment in msg.attachments %}
{%- if attachment.media_type|media_type_main == 'image' %} {{attachment.name}} {%- else %} {{ icon('doc', cls='icon') }} {%- endif %}
{{attachment.name}}
{%- endfor %}
{% endif %}