{% if m %}{{m['username']}}{% else %}NULL{% endif %}{% if m %}{{m['time'] | timestamp}}{% else %}just now{% endif %}
{% endmacro %}
{% macro chat_line_template(id, m) %}
{% set quote_exists = m and m['quotes'] and messages.get(m['quotes']) %}
{% set mentioned = m and vlink in m['text_html'] or (quote_exists and messages[m['quotes']]['user_id'] == v.id) %}
{% if m %}
{% if v.slurreplacer %}
{{m['text_censored'] | safe}}
{% else %}
{{m['text_html'] | safe}}
{% endif %}
{% endif %}
{% if m %}{{m['text']}}{% endif %}
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% endif %}
{% endmacro %}
{{chat_group_template()}}
{{chat_line_template()}}
{% set messages_list = messages.items()|list %}
{% for id, m in messages_list %}
{% set same = loop.index > 1 and m['user_id'] == messages_list[loop.index-2][1]['user_id'] %}
{% if not same %}
{% if loop.index > 1 %}