From 6ff30c643aa939790fb9edd93609e889786322db Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Aug 2022 18:54:08 +0300 Subject: [PATCH] Fix user links in Recent Actions. --- .../history/admin_log/history_admin_log_item.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index aeb103b18..87a501d30 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -458,14 +458,17 @@ auto GenerateParticipantString( const auto peer = session->data().peer(participantId); auto name = TextWithEntities { peer->name()}; if (const auto user = peer->asUser()) { - auto entityData = QString::number(user->id.value) - + '.' - + QString::number(user->accessHash()); + const auto data = TextUtilities::MentionNameDataFromFields({ + .selfId = session->userId().bare, + .userId = peerToUser(user->id).bare, + .accessHash = user->accessHash(), + }); name.entities.push_back({ EntityType::MentionName, 0, int(name.text.size()), - entityData }); + data, + }); } const auto username = peer->userName(); if (username.isEmpty()) {