{# Conversation timeline: message bubbles for the chat pane. Re-rendered verbatim by the poll endpoint, so it stays self-contained. #} {% set timeline_items = [] %} {% for item in timeline %} {% if item.__class__.__name__ == 'Message' %} {% set _ = timeline_items.append((item.created_at, item)) %} {% endif %} {% endfor %} {% set me_name = current_user.profile.full_name if current_user.profile and current_user.profile.full_name else current_user.email %} {% set other_name = (other.profile.full_name if other and other.profile and other.profile.full_name else other.email) if other else 'Participant' %} {% set me_initial = (me_name[0]|upper) if me_name else 'Y' %} {% set other_initial = (other_name[0]|upper) if other_name else 'P' %} {% if timeline_items %} {% set ns = namespace(prev=none) %} {% for _, item in timeline_items|sort(attribute=0) %} {% set d = item.created_at.date() %} {% if d != ns.prev %}
Say hello and ask {{ other_name }} about the listing — availability, condition, or a good time to meet on campus.