Skip to content

Compact new chat card in operator topics - #98

Merged
remdex merged 1 commit into
LiveHelperChat:masterfrom
mysubcult:feat/compact-new-chat-card
Oct 26, 2026
Merged

remdex merged 1 commit into
LiveHelperChat:masterfrom
mysubcult:feat/compact-new-chat-card

Conversation

@mysubcult

@mysubcult mysubcult commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

The first message of a new chat topic is a long tree, and on phones it fills the whole screen before the actual conversation starts:

├──New chat
├──Department: Support
├──ID: 1234
├──Nick: Visitor
├──Referrer: xn--e1afmkfd.xn--p1ai/pricing#contacts
├──Page title: Pricing
├──IP: 203.0.113.10
├──GEO: Germany
└──Messages:

This PR keeps the same information in three lines:

🆕 #1234 · Support
👤 Visitor · 🇩🇪 Germany · 203.0.113.10
📄 Pricing        ← link to the referrer
─────────────
(chat messages as before)
  • Chat id in bold, department next to it.
  • Nick, Telegram username and phone (when known), country flag + name, IP in <code> (one tap to copy, no phone-number autolink).
  • The page is a link titled with the page title; without a title the readable address is shown (IDN host decoded). Full referrer stays the link target.
  • Additional data lines use ▫️ key: value; previous chat messages start with 🕘 #<previous chat id>:.
  • All values are HTML-escaped (the message is sent with parse_mode HTML; before, a < in a nick or page title could break the message).
  • The card is built in TelegramLiveHelperChatOperator::buildChatCard() with small helpers countryFlag() and formatChatPage(), so it is easy to adjust.

No settings or database changes.

🤖 Generated with Claude Code

The first topic message was a 9-line tree (New chat / Department / ID / Nick /
Referrer / Page title / IP / GEO / Messages). Now it is three lines: chat id
and department; nick, username, phone, country flag and IP; the page as a link
titled with the page title instead of the raw (punycode) referrer. Values are
HTML-escaped, the message keeps parse_mode HTML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remdex
remdex merged commit eb8c908 into LiveHelperChat:master Oct 26, 2026
mysubcult added a commit to mysubcult/telegram that referenced this pull request Oct 26, 2026
…perChat#98, LiveHelperChat#100, LiveHelperChat#101, LiveHelperChat#104 accepted upstream; fork already had them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mysubcult
mysubcult deleted the feat/compact-new-chat-card branch October 26, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants