From 220dcb1579efdc21309fdcac61a47b7134c6369a Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 3 Jul 2026 09:33:29 +0200 Subject: [PATCH] feat(tgbot): show inbound remark alongside email in the online clients list Online-client buttons showed only the email, which is ambiguous when the same usernames exist across inbounds. Label each button email - remark via the canonical GetClientInboundByEmail lookup (first matching inbound for multi-inbound clients); the callback payload stays the bare email. Closes #5318 --- internal/web/service/tgbot/tgbot_report.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/web/service/tgbot/tgbot_report.go b/internal/web/service/tgbot/tgbot_report.go index 25395e76a..8f2afa972 100644 --- a/internal/web/service/tgbot/tgbot_report.go +++ b/internal/web/service/tgbot/tgbot_report.go @@ -374,7 +374,11 @@ func (t *Tgbot) onlineClients(chatId int64, messageID ...int) { if onlinesCount > 0 { var buttons []telego.InlineKeyboardButton for _, online := range onlines { - buttons = append(buttons, tu.InlineKeyboardButton(online).WithCallbackData(t.encodeQuery("client_get_usage "+online))) + label := online + if _, inbound, err := t.inboundService.GetClientInboundByEmail(online); err == nil && inbound != nil && inbound.Remark != "" { + label = online + " - " + inbound.Remark + } + buttons = append(buttons, tu.InlineKeyboardButton(label).WithCallbackData(t.encodeQuery("client_get_usage "+online))) } cols := 0 if onlinesCount < 21 {