{# a first contact waiting for a decision: who wants what of which agent, through where, the first message whole, and the decision; until it is let in, the agent sends only what it is set to, or nothing #} {% set first = opened.history.messages[0] if opened.history.messages else none %} {% set who = m.named(conversation) | trim %}
{{ m.icon("clock") }}{{ t.text("chats.pending") }}

{{ t.text("chats.first.contact") }}

{{ t.text("chats.wants." ~ conversation.kind, {"who": "%s" | format(who | e), "agent": "%s" | format(agent.name | e)}) | safe }}

{{ m.logo(conversation.channel) }}{% if conversation.handle %}@{{ conversation.handle }}{% else %}{{ t.text("chats.members", {"n": conversation.member_count}) }}{% endif %}{% if first %}ยท{{ t.text("chats.first.at", {"when": first.at_ms | ago}) }}{% endif %}
{% if first %}{% set from = m.who(first.sender) | trim %}
{{ from[:1] | upper }}
{{ first.body }}
{% endif %} {% if opened.approve %}
{% if not agent.online %}{{ t.text("chats.offline") }}{% endif %}
{% endif %}
{{ m.icon("message-circle") }}{{ t.text("chats.until." ~ ("reply" if opened.reply else "silent"), {"agent": agent.name, "who": who}) }}