{% for msg in messages %} {% include "components/message.html" %} {% endfor %} {# Update last_seq for polling new messages (append mode) #} {% if update_last_seq and last_seq %} {% endif %} {# Update "Load earlier" button when loading older messages (prepend mode) #} {% if update_load_earlier and first_seq %}