{% set refresh_url = '/conversation?chat=' + (chat | urlencode) if is_group else '/conversation?handle=' + (handle | urlencode) %}

{{ name }}

{{ subtitle }}
{% for m in msgs %}
{% if is_group and not m.from_me and m.sender_name %}
{{ m.sender_name }}
{% endif %} {% for a in m.attachments %} {% if not a.ready %}
📎 syncing…
{% elif a.kind == 'image' %} {{ a.name }} {% elif a.kind == 'video' %} {% elif a.kind == 'audio' %} {% else %} 📎 {{ a.name }} {% endif %} {% endfor %} {% if m.text %}
{{ m.text }}
{% endif %}
{{ m.ts }} {% if m.from_me and m.status and m.status != 'delivered' %} {% if m.status == 'failed' %}⚠️ {{ m.label }} {% elif m.status == 'sent' %}✓ sent {% else %}⏳ {{ m.label }}{% endif %} {% endif %}
{% endfor %}
{% if is_group %} {% else %} {% endif %}