{% macro icon(name) %}{% include "chats/icons/" ~ name ~ ".svg" %}{% endmacro %} {# a channel's logo, standing for its name; a puzzle piece for a kind without one #} {% macro logo(kind) %}{% include ["chats/logos/" ~ kind ~ ".svg", "chats/icons/puzzle.svg"] %}{% endmacro %} {# a channel by its name, the kind itself for one without #} {% macro channel(kind) %}{{ t.text("chats.channel." ~ kind) if t.has("chats.channel." ~ kind) else kind }}{% endmacro %} {# who sent something, by the name it shows #} {% macro who(sender) %}{{ (sender.display_name or sender.name or sender.id) if sender else t.text("chats.someone") }}{% endmacro %} {# what a conversation is called: a group by its name, a private one by who it is with #} {% macro named(conversation) %}{{ conversation.name or conversation.handle or t.text("chats.kind." ~ conversation.kind) }}{% endmacro %} {# a conversation's face: a group's icon or the first letter of who it is with, the channel's logo on its corner #} {% macro face(conversation, cls="cav") -%} {% if conversation.kind == "group" %}
{% if reason.reason == "enabling" %}{% else %}{{ icon("triangle-alert") }}{% endif %}{{ t.text("chats.away." ~ reason.reason, {"computer": computers.get(computer_id, "—"), "agents": names, "error": reason.error or ""}) }}
{% endfor %}