From b15402dc72a1607c2d361bd5329be1ff4844534f Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Sat, 10 Aug 2024 10:05:58 +0300 Subject: [PATCH] feat: show bot start token --- Telegram/SourceFiles/history/history_widget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index e72e03ad7..853d90119 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3024,6 +3024,14 @@ void HistoryWidget::updateControlsVisibility() { } else if (isBotStart()) { toggle(_botStart); _discuss->hide(); + + const auto startToken = _peer->asUser()->botInfo->startToken; + if (!startToken.isEmpty()) { + const auto s = QString("%1 (%2)").arg(tr::lng_bot_start(tr::now).toUpper()).arg(startToken); + _botStart->setText(s); + } else { + _botStart->setText(tr::lng_bot_start(tr::now).toUpper()); + } } _kbShown = false; _fieldAutocomplete->hide();