mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix user links in Recent Actions.
This commit is contained in:
parent
5f8fca0355
commit
6ff30c643a
1 changed files with 7 additions and 4 deletions
|
@ -458,14 +458,17 @@ auto GenerateParticipantString(
|
||||||
const auto peer = session->data().peer(participantId);
|
const auto peer = session->data().peer(participantId);
|
||||||
auto name = TextWithEntities { peer->name()};
|
auto name = TextWithEntities { peer->name()};
|
||||||
if (const auto user = peer->asUser()) {
|
if (const auto user = peer->asUser()) {
|
||||||
auto entityData = QString::number(user->id.value)
|
const auto data = TextUtilities::MentionNameDataFromFields({
|
||||||
+ '.'
|
.selfId = session->userId().bare,
|
||||||
+ QString::number(user->accessHash());
|
.userId = peerToUser(user->id).bare,
|
||||||
|
.accessHash = user->accessHash(),
|
||||||
|
});
|
||||||
name.entities.push_back({
|
name.entities.push_back({
|
||||||
EntityType::MentionName,
|
EntityType::MentionName,
|
||||||
0,
|
0,
|
||||||
int(name.text.size()),
|
int(name.text.size()),
|
||||||
entityData });
|
data,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const auto username = peer->userName();
|
const auto username = peer->userName();
|
||||||
if (username.isEmpty()) {
|
if (username.isEmpty()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue