Title: {{ room.title }}
Created by {{ room_creator.displayName }} ({{ room_creator.emails[0] }}) on {{ room.created|datetime_format(timestamp_format) }}{% if room.lastActivity %} and last had activity on {{ room.lastActivity|datetime_format(timestamp_format) }}{% endif %}.

{% for msg in messages %}
    {% if not msg.parentId %}
        {{- msg.created|datetime_format(timestamp_format) }}{{" "}}{% if msg.personEmail %}{{ msg.personEmail }}{% else %}{{ people.get(msg.personId, {'emails': ['unknown']}).emails[0] }}{% endif %}: {{ msg.text|format_msg(False) }}
        {% if msg.files %}
            {% for url in msg.files %}
                {% if attachments[url].deleted == false %}
                    {{- msg.created|datetime_format(timestamp_format) }}{{" "}}{% if msg.personEmail %}{{msg.personEmail}}{% else %}{{ people.get(msg.personId, {'emails': ['unknown']}).emails[0] }}{% endif %}: Attachment: {{ attachments[url].filename }} ({{ attachments[url].content_length }} bytes, {{ attachments[url].content_type }})
                {% else %}
                    Attachment: File deleted or not found.
                {% endif %}
            {% endfor %}
        {% endif %}
        {% if msg.id in threads and threads[msg.id]|length > 0 %}
            {% for response in threads[msg.id] %}
                {{- "   (reply) " }}{{- response.created|datetime_format(timestamp_format) }}{{" "}}{% if response.personEmail %}{{response.personEmail}}{% else %}{{ people[response.personId].emails[0] }}{% endif %}: {{ response.text|format_msg(True) }}
                {% if response.files %}
                    {% for url in response.files %}
                        {% if attachments[url].deleted == false %}
                            {{- "   (reply) " }}{{- response.created|datetime_format(timestamp_format) }}{{" "}}{% if response.personEmail %}{{response.personEmail}}{% else %}{{ people[response.personId].emails[0] }}{% endif %}: Attachment: {{ attachments[url].filename }} ({{ attachments[url].content_length }} bytes, {{ attachments[url].content_type }})
                        {% else %}
                            {{- "   (reply) " }}Attachment: File deleted or not found.
                        {% endif %}
                    {% endfor %}
                {% endif %}
            {% endfor %}
        {% endif %}
    {% endif %}
{% endfor %}