Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not add buddy by phone number #187

Closed
bodograumann opened this issue Dec 17, 2015 · 5 comments
Closed

Can not add buddy by phone number #187

bodograumann opened this issue Dec 17, 2015 · 5 comments

Comments

@bodograumann
Copy link

After I have added a buddy by his phone number, he is displayed as offline. If I then try to send him a message, pidgin says it could not be sent. The log shows:

(14:10:53) prpl-telegram: tgprpl_send_typing()
(14:10:54) prpl-telegram: tgprpl_send_im()
(14:10:54) prpl-telegram: peer not found
(14:10:54) prpl-telegram: tgprpl_send_typing()

I'm on Gentoo with libpurple 2.10.11 and current commit ab75ad6.

@majn
Copy link
Owner

majn commented Dec 17, 2015

Yes, its not implemented yet.

@pitersky
Copy link

+1 For this feautre to be implemented.

Adding telegram discussion about the issue here, to mention some key points and not to repeat the answers

(14:40:34) Matthias Jentsch: No, its not implemented yet. The add contact function is default in pidgin and only works for contacts you already associate with and only works by specifying the user name.
(14:41:51) Matthias Jentsch: So basically when you only have someone in a group chat and want him to also show up in the buddy list.
(14:44:42) Matthias Jentsch: If I implement adding a contact the default pidgin it will be an extra action. Since Telegram requires 2 inputs, the phone number and the given name.
(17:30:44) Yuri Shilka: Thank you for answer! Now it's more clear...
(17:42:00) Yuri Shilka: But anyway, just to discus. As it seems to me, the default input should be the telephone number of a buddy you adding. Becuse that's how the original application works, I think.
(17:47:40) Yuri Shilka: Did I understood correctly, that this is a limitation of pidgin, and can't be done (without adding an extra field)?
(17:58:05) Matthias Jentsch: I didnt research it thorougly yet, but it seems like thats the case. Add buddy simply offers one field for username, create a buddy with than name and notify the protocol. At this point we still need to query the name of the new user from the buddy. Additionally, the username is different to the phone number in Telegram, which means that the buddy already has the wrong name at that point.
(17:58:45) Matthias Jentsch: *notifies
(18:00:05) Enrico Mioso: Infact I can talk to buddies without having their mobile phone sometimes
(18:00:13) Enrico Mioso: mobile number I mean
(18:03:24) Matthias Jentsch: Yes, you cant see the phone number for buddies you dont have in your contact list. This. Is the reason why its not viable as a username.
(18:05:19) Enrico Mioso: Really?
(18:05:24) Enrico Mioso: I can't in some cases Matthias
(18:06:21) Matthias Jentsch: Exactly you cant see anyones phone number.
(18:06:30) Matthias Jentsch: *everyones
(18:06:52) Enrico Mioso: you can see the phone numbers of users you already know the phone numbers
(18:07:18) Enrico Mioso: but if you obtain an username via other methods like th "username resolution" in telegra-cli, you will not be ableto see their numbers, right?
(18:10:28) Matthias Jentsch: Yes
(18:11:33) Matthias Jentsch: Pidgin doesnt really handle the lack of one globally usable username too well.
(18:16:40) Matthias Jentsch: This causes problems like the ones we are discussing right now ;)

@ghsrcgh
Copy link

ghsrcgh commented Jul 1, 2017

I do not understand 3 strings (14:40:34), (14:41:51), (14:44:42).
Telegram have a two ways to add the user:

  • by phone number (you will be able to chat with him if you had added him to a "contact list" on the phone; previous I thought that it is important to be in his contact lists too, but it seems not - it is enough to add user to yours contact list on phone and upload your contact list to tg's server)
  • by username (you will be able to search him in public available user list, even symbol-by-symbol and add without his permission; but you will do not know his phone until he will not add yours phone to his addressbook).

And please note: there are a lot of users that does not have associated @-username, and they have only a phone number at all. (And of course, all official clients allow to talk with that users)

Why Pidgin/Telegram-Purple does not allow to add users by phone number?! The logic must be that: when you adding it to the contact list of Pidgin it must be like you had added to the contact list (addressbok) of the phone. //So he is listed in your contact list. In case if you are listed in his contact list (on the phone or other device) --wrong part//, you will see him online and you both will be able to chat together.

Just to be sure: I have an Android Phone, I have added some users to my contact list, that users does not have my phone, but I see all of them and can initiate chat or secret chat. Many of that users does not have associated @-username, only phone number.

@ghsrcgh
Copy link

ghsrcgh commented Jul 2, 2017

Some additional information from Telegram's FAQ:

Q: What can I use as my username?
You can use a-z, 0-9 and underscores. Usernames are case-insensitive, but Telegram will store your capitalization preferences (e.g. Telegram and TeleGram is the same user). The username must be at least five characters long.

Q: Do I need a username?
You don‘t have to get one. Remember that Telegram usernames are public and choosing a username on Telegram makes it possible for people to find you in global search and send you messages even if they don’t have your number. If you are not comfortable with this, we advise against setting up a username.

Q: If someone finds me by username, messages and I reply — will they know my number?
No. Neither party will see another‘s phone number. This is similar to the case when you message a person who you’ve met in a Telegram group.

There is one exception to this: just as in the case of all Telegram messages, if you have somebody‘s number saved as a contact and you send them a message, your number also becomes visible to them. Just like with SMS. This happens regardless of how you open the conversation with that person — via the contacts menu, global search by username, t.me link, or from a group’s members page.

@BenWiederhake
Copy link
Collaborator

If anyone feels like implementing this enhancement, it might be a better idea to direct your energy to tdlib-purple, which might already have this enhancement. For now, there seems to be nobody who implements any enhancements for telegram-purple, so I'm closing all "enhancement" issues.
Of course, Pull Requests are still very much welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants