{% if selected and view_mode in ['profile', 'members'] %} {% endif %} {% if selected %}
{% if view_mode in ['profile', 'members'] %} {% else %}

{{ selected.name or selected.id }}

{{ selected.kind }}{% if selected.kind == 'group' %} · {{ selected.member_count }} members{% endif %}

{% endif %}
{% if view_mode == 'profile' %}
{% set info = profile_info(selected) %} {% set avatar = profile_picture_url(selected) %} {% if avatar %}{{ selected.name or selected.id }} avatar{% endif %}

{{ info.name }}

Type: {{ info.kind }}

{% if selected.kind == 'group' %}

Members: {{ info.member_count }}

{% if info.created_time %}

Created: {{ info.created_time }}

{% endif %} {% if info.picture_status %}

Picture status: {{ info.picture_status }}

{% endif %} {% else %} {% if info.user_id %}

User ID: {{ info.user_id }}

{% endif %} {% if info.phonetic_name %}

Phonetic name: {{ info.phonetic_name }}

{% endif %} {% if info.region_code %}

Region: {{ info.region_code }}

{% endif %} {% if info.status_message %}

{{ info.status_message }}

{% endif %} {% endif %}
{% elif view_mode == 'members' %}
    {% for mid in member_mids %}
  1. {{ member_names.get(mid, mid) }}
  2. {% else %}
  3. No member information available.
  4. {% endfor %}
{% else %}
    {% set unread_boundary = 0 %} {% if unread_count is defined and messages|length > unread_count %}{% set unread_boundary = messages|length - unread_count %}{% endif %} {% for message in messages %} {% if loop.index0 == unread_boundary and unread_count is defined and unread_count > 0 %}
  1. ----- unread messages -----
  2. {% endif %} {% set own_message = message.from_mid == (config.get('OMNILINE_API').tokens.mid if config.get('OMNILINE_API') and config.get('OMNILINE_API').tokens else '') %}
  3. {% if message.from_mid != (config.get('OMNILINE_API').tokens.mid if config.get('OMNILINE_API') and config.get('OMNILINE_API').tokens else '') %}{% if message.from_mid %}{{ sender_names.get(message.from_mid, selected.name if selected.kind == 'contact' else message.from_mid or 'Unknown') }}{% else %}Unknown{% endif %}{% endif %} {% set media = media_messages.get(message.id) if media_messages is defined else none %} {% if media and media.kind == 'image' %} {{ media.name }} {% elif sticker_messages is defined and sticker_messages.get(message.id) %} {% set sticker = sticker_messages.get(message.id) %} {{ sticker.alt }} {% elif media %}

    {{ media.kind }}: {{ media.name }}

    {% else %}

    {{ message_display_text(message, sender_names)|linkify }}

    {% endif %} {% if reaction_details_message_id == message.id and reaction_details %}
      {% for detail in reaction_details %}
    • {{ reaction_names.get(detail.from_mid, detail.from_mid or 'Unknown') }}: {{ detail.symbol }} {{ detail.name }}
    • {% endfor %}
    {% endif %}
  4. {% else %}
  5. No messages in the recent history.
  6. {% endfor %}
{% if send_error %}{% endif %}
{% if reply_target %}

Replying to: {{ message_display_text(reply_target, sender_names) }}

{% endif %}
{% if reply_target %}Cancel reply{% endif %}

{% if reaction_target %}
{% if reaction_error %}{% endif %}

React to: {{ message_display_text(reaction_target, sender_names) }}

{% if user_reacted %} {% else %} {% endif %}

{% endif %} {% if unsend_target %}

Unsend: {{ message_display_text(unsend_target, sender_names) }}

{% endif %}

Recent history may be bounded by the server.

{% endif %} {% else %}

Select a chat

Choose a conversation to read its recent history.

{% endif %}

Chats

{% if chats %} {% else %}

No conversations.

{% endif %}