From 708949a62e1bb744128eefe84f0ee390e13aeb7f Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 5 May 2026 23:45:34 +0400 Subject: [PATCH] Fix stars refund message text for monoforum admin. --- Telegram/SourceFiles/history/history_item.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 4eb305b5a6..3236fcffc1 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -6682,14 +6682,20 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) { auto preparePaidMessagesRefunded = [&](const MTPDmessageActionPaidMessagesRefunded &action) { auto result = PreparedServiceText(); - if (_from->isSelf()) { - result.links.push_back(_history->peer->createOpenLink()); + const auto sublist = _history->amMonoforumAdmin() + ? savedSublist() + : nullptr; + const auto recipient = sublist + ? sublist->sublistPeer().get() + : _history->peer.get(); + if (_from->isSelf() || sublist) { + result.links.push_back(recipient->createOpenLink()); result.text = tr::lng_action_paid_message_refund_self( tr::now, lt_count, action.vstars().v, lt_name, - tr::link(_history->peer->shortName(), 1), + tr::link(recipient->shortName(), 1), tr::marked); } else { result.links.push_back(_from->createOpenLink());