Fix stars refund message text for monoforum admin.

This commit is contained in:
John Preston
2026-05-05 23:45:34 +04:00
parent 647e3b4b4f
commit 708949a62e
@@ -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());