File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,10 +61,13 @@ public static async Task ViewContacts(ITelegramBotClient botClient, Update updat
6161 List < long > contactUserTGIds = await contactGetterRepository . GetAllContactUserTGIds ( userGetter . GetUserIDbyTelegramID ( update . CallbackQuery ! . Message ! . Chat . Id ) ) ;
6262 List < string > contactUsersInfo = new List < string > ( ) ;
6363
64+ int ownerUserId = userGetter . GetUserIDbyTelegramID ( update . CallbackQuery ! . Message ! . Chat . Id ) ;
6465 foreach ( var contactUserId in contactUserTGIds )
6566 {
6667 int id = userGetter . GetUserIDbyTelegramID ( contactUserId ) ;
67- string username = userGetter . GetUserNameByTelegramID ( contactUserId ) ;
68+ string actualName = userGetter . GetUserNameByTelegramID ( contactUserId ) ;
69+ string ? displayName = contactGetterRepository . GetContactDisplayName ( ownerUserId , id ) ;
70+ string username = ! string . IsNullOrEmpty ( displayName ) ? $ "{ displayName } ({ actualName } )" : actualName ;
6871 string link = userGetter . GetUserSelfLink ( contactUserId ) ;
6972
7073 contactUsersInfo . Add ( string . Format ( Config . GetResourceString ( "ContactInfo" ) , id , username , link ) ) ;
You can’t perform that action at this time.
0 commit comments