{% macro attachment(attach) -%}
{% if attach.voiceNote or attach.contentType == "audio/mpeg" %} {% 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" or attach.contentType == "image/webp" %}
{% else %} Attachment of type {{ attach.contentType }} {% endif %}
{%- endmacro %} Signal2HTML · {{ thread_name }}
{% for msg in messages %} {% if "date_msg" in msg %}

{{ msg.body }}

{% else %} {% if msg.type == 'call-incoming' %}
{{ msg.event_data | safe }} called you
{% elif msg.type == 'call-outgoing' %}
You called
{% elif msg.type == 'call-missed' %}
Missed call
{% elif msg.type == 'video-call-incming' %}
Video call from {{ msg.event_data | safe }}
{% elif msg.type == 'video-call-outgoing' %}
Outgoing video call
{% elif msg.type == 'video-call-missed' %}
Missed video call
{% elif msg.type == 'group-call' %}
Group call {% if msg.event_data %}started by {{ msg.event_data | safe }}{% endif %}
{% elif msg.type == 'key-update' %}
{{msg.event_data | safe}} has a new safety number
{% elif msg.type == 'group-update-v1' or msg.type == 'group-update-v2' %}
{% if msg.event_data.header %}{{msg.event_data.header}}{% endif %}
    {% if msg.event_data.name %}
  • Name: {{msg.event_data.name}}{% endif %} {% for member_list in msg.event_data.member_lists %}
  • {{member_list.header}}
      {% for member in member_list.members %}
    • {{member | safe}} {% endfor %}
    {% endfor %}
{% if msg.attachments %} {% for attach in msg.attachments %}
Group photo
{{ attachment(attach) }} {% endfor %} {% endif %} {% if debug_messages %} {{msg.body}} {% endif %} {% 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.body %} {% if msg.isAllEmoji %}
{% else %}
{% endif %}
{{ msg.body | safe }}
{% endif %} {% endif %} {{ msg.date.strftime('%b %d, %H:%M') }} {% if msg.reactions %}
{% for reaction in msg.reactions %} {{reaction.what}}From {{reaction.name}}
Sent {{reaction.time_sent.strftime('%b %d, %H:%M')}}
Received {{reaction.time_received.strftime('%b %d, %H:%M')}}
{% endfor %}
{% endif %} {% endif %}
{% endfor %}