- {% 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) %}
-
- {% 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 %}
-
+{% endmacro %}
+
+{% macro chat_group_template(id, m) %}
+
+ {% if m %}{{m['username']}}{% else %}NULL{% endif %}
+ {% if m %}{{m['time'] | timestamp}}{% else %}just now{% endif %}
+
+{% endmacro %}
+
+{% macro chat_line_template(id, m, vlink) %}
+ {% 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) %}
+
+ {% 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 %}
+