{% macro attachment(attach) -%}
{% if attach.voiceNote %} {% elif attach.contentType == "video/mp4" or attach.contentType == "video/3gpp" %} {% elif attach.contentType == "image/jpeg" or attach.contentType == "image/png" or attach.contentType == "image/gif" %}
{% endif %}
{%- endmacro %} Signal2HTML · {{ thread_name }}
{% for msg in messages %} {% if "date_msg" in msg %}

{{ msg.body }}

{% else %}
{% if msg.isGroup and msg.type == 'incoming' %} {{ msg.name }} {% endif %} {% if msg.quote %}
{{ msg.quote.name }}

{{ msg.quote.body | safe }}

{% if msg.quote.attachments %}
{% for attach in msg.quote.attachments %} {{ attachment(attach) }} {% endfor %}
{% endif %}
{% endif %} {% if msg.attachments %} {% for attach in msg.attachments %} {{ attachment(attach) }} {% endfor %} {% endif %} {% if msg.isCall %}
{% endif %} {% if msg.body %} {% if msg.isAllEmoji %}

{% else %}

{% endif %} {{ msg.body | safe }}

{% endif %} {{ msg.date.strftime('%b %d, %H:%M') }}
{% endif %} {% endfor %}