{# Reusable chat message list. Shared by the thread page and the polling fragment so rendering logic is defined once. Expects `messages` and `other`. #} {% set visible = messages | rejectattr('deleted_at') | list %} {% if visible %} {% for m in visible %} {% if m.message_type.value == 'system' %}
{{ m.message }}
{% else %} {% set mine = m.sender_id == current_user.id %}
{{ m.message }}
{% endif %} {% endfor %} {% else %}
Start the conversation with {{ other.profile.full_name if other.profile else other.email }}.
{% endif %}