Message: Fix mention without username (#1625)

This commit is contained in:
Alexander Zinchuk 2022-01-05 17:46:04 +01:00
parent 9119a1afdd
commit 5cecb63cef

View File

@ -1031,7 +1031,7 @@ function buildApiMessageEntity(entity: GramJs.TypeMessageEntity): ApiMessageEnti
type,
offset,
length,
...('userId' in entity && typeof entity.userId === 'number' && { userId: entity.userId }),
...(entity instanceof GramJs.MessageEntityMentionName && { userId: buildApiPeerId(entity.userId, 'user') }),
...('url' in entity && { url: entity.url }),
};
}