Tdesktop: Revert to user's chosen name instead of phone number after removing from contacts

Created on 26 Jan 2017  路  32Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Add user as mutual contact
  2. Open a chat with the user
  3. Remove the contact

Expected behaviour

After removing a user from contacts, the name displayed in messages and on the chat list should revert to the user's selected name. This is the current behavior in group chats. This behavior is permanent, as Telegram is designed to never remove a user's phone number once it is shared.

As a user, I have no desire to connect Telegram to my actual phone/desktop/whatever contacts, particularly because it prevents me from seeing the user's chosen name. It is frustrating that once someone else has added me as a contact, I can never see their proper name again, even if I remove the contact.

Actual behaviour

When the user is removed from contacts, their name in direct chats and the chat list appears as their phone number. Group chats display the user's chosen name.

Below are screenshots of what the user looks like in the private chat and chat list, and then what the same user looks like in the user detail view. As you can see, it's quite inconsistent.

phone_number
detail_view

Configuration

Windows 10 Pro, Telegram Desktop 1.0.2

enhancement

Most helpful comment

Upvote for this issue. This is annoying since there's no way to "let Telegram servers forget phone numbers shared to me as I delete a contact" (And of course there should be).

However, disregarding the server issue, basically I guess nobody would like a phone number showing as a chat title, that's meaningless. It's so mysterious, I couldn't even try to understand, for what kind of conern, that all Telegram's official App behaves like this.

Currently there's no way to keep a contact's name updating once he/she shared his/her phone number. Add contact, the name will be frozen to that time; Delete contact, stupid phone number titles come into my eyes.

At least fix this ugly behaviour on the client side, please.

All 32 comments

@nachoparker Fix. Your. Mail.

It's consistent with Android version, btw

And iOS too.

1096 ?

1096 is not related. This is not a privacy issue but rather a UX issue. If anything #2263 might be related, but that was wrongly closed as a duplicate and contains less information.

Really the ANNOYING issue. Moreover, I have it even for people who NEVER were in my contact list. Is it going to be resolved?

But isn't this an API issue?

I believe IT IS. But not sure where to report.

@amberv0 This is done on client side, but it is done in the main apps (iOS / Android), so it is done in tdesktop the same way, for consistency.

@john-preston So, "wontfix"?

@john-preston , it doesn't seem like a good idea anywhere. Why on earth would I prefer to see a number instead of a person's name?

The native macOS client has changed its behavior to display names instead of phone numbers. I'm hoping the others will do this as well, even though the macOS client is no longer considered official.

@BrandonDusseau

macOS client is no longer considered official

Sorry for being offtopic, but why and since when?

It seems I was mistaken. I'd heard at some point that it wasn't and didn't see it on the site last I checked. It's definitely there though, so disregard that.

This is still an issue. Any fix in the near future?

Related places in case anyone wants to give it a try:

localstorage.cpp:3950
app.cpp:1331
app.cpp:1928

this is still occurring, it's happening with someone who is not a contact, and whom i've never exchanged numbers with. when they look at my profile they cannot see my number.

@talaitha do you have "name surname joined Telegram!" as first message in dialog with them?

@stek29 negatory. first message is just "hello" i have screenshots i submitted via contact form on tg website

Continues to affect Telegram Desktop at 1.2.1. It seems that the Telegram X iOS app has adopted the behavior of ignoring the API and replacing the phone number with the user's display name. With both Telegram X and the macOS desktop client doing this now, is there a significant disadvantage to adopting this behavior in Telegram Desktop?

This just happened to me just now, is there any ETA on actually doing something about it, or any workarounds anyone has found?

As of Telegram 5 on iOS, chosen names are now shown instead of phone numbers. The less desirable behavior persists on Telegram Desktop 1.4.

This is still occurring on Windows 10, Telegram Desktop 1.7.3, and it is replicated on my phone. My contacts do not sync with my phone, and now a number of contacts have switched from showing their name to their phone number in my chat list and on the chat header. If I click on the chat header where the number is shown, I see their chosen name on the profile, but not in the chat list. The chosen name also shows up properly when those contact post in groups chats.

Upvote for this issue. This is annoying since there's no way to "let Telegram servers forget phone numbers shared to me as I delete a contact" (And of course there should be).

However, disregarding the server issue, basically I guess nobody would like a phone number showing as a chat title, that's meaningless. It's so mysterious, I couldn't even try to understand, for what kind of conern, that all Telegram's official App behaves like this.

Currently there's no way to keep a contact's name updating once he/she shared his/her phone number. Add contact, the name will be frozen to that time; Delete contact, stupid phone number titles come into my eyes.

At least fix this ugly behaviour on the client side, please.

Upvote, appeared in 1.7.3 desktop and 5.7.0 Android

I attached the patch according to this issue (#6109)

However, since this issue seems more likely intended instead of a bug, it would be nice that someone could at least explain something if the fix is not to get approved.

Please change it. I can't see my friend's name. This is stupid.

This has begun happening to me on iOS after a fresh restore. I have always denied Telegram access to my contacts, but I now find that users who have chosen to share their phone number appear using that number in place of their chosen display name. Users who do not share their number obviously appear using their chosen display name.

I like the ability to override a user鈥檚 display name鈥攕ay, if they are prone to changing their details frequently, so that you can keep track of who they are in your chats list鈥攂ut the current behavior of this system is unintuitive at best and baffling at worst.

@jesstech This issue is for Telegram Desktop only. For iOS, you will have to create an issue on the appropriate repository.

This is hardly an enhancement, more like a bug.

Also it seems like both desktop and android versions show the user-set display name on the chat list and when I view their profile, but the phone number in the chat header; IF they have their phone number visible to me. If the phone number is hidden, the user-set display name is shown.

My guess is that PeerData::topBarNameText uses user->phoneText when that isn't empty, and I suspect that's the phone number as text, whereas probably nobody cares about anyone's phone number outside of when viewing their contact's profile. I see no immediate reason not to use PeerData::nameText in TopBarWidget::paintTopBar. Unfortunately I can't make cmake recognise the rlottie I installed so I can't make an example build to check.

diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp
index 92af82f9b..54367d93a 100644
--- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp
@@ -344,7 +344,7 @@ void TopBarWidget::paintTopBar(Painter &p) {
            text);
    } else if (const auto history = _activeChat.history()) {
        const auto peer = history->peer;
-       const auto &text = peer->topBarNameText();
+       const auto &text = peer->nameText();
        const auto badgeStyle = Ui::PeerBadgeStyle{
            nullptr,
            &st::attentionButtonFg };
@@ -362,7 +362,7 @@ void TopBarWidget::paintTopBar(Painter &p) {
        const auto namewidth = availableWidth - badgeWidth;

        p.setPen(st::dialogsNameFg);
-       peer->topBarNameText().drawElided(
+       text.drawElided(
            p,
            nameleft,
            nametop,

(not so sure about the second hunk, as I'm not a C++ programmer, but you get the idea)

Hey there!

This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

Bumping. Issue still present in Telegram Desktop 2.4.4. However, the name now appears to display in the chat list, but the phone number still appears in the top bar inside the chat.

Was this page helpful?
0 / 5 - 0 ratings