EionRobb / purple-hangouts

47 stars 4 forks source link

Contacts with mobile numbers don't show up as mobile (SMS) #110

Open EionRobb opened 7 years ago

EionRobb commented 7 years ago

Original report by Jake Magee (Bitbucket: jake_magee, ).


None of my contacts with mobile numbers will show up as mobile (SMS) contact. The only way I can get a contact to show up as mobile is to use hangouts to send them an SMS, which then shows up with a unique contact ID that has no contact information other than the phone number.

Is there a problem with how my google contact information is stored?

EionRobb commented 7 years ago

Original comment by Eion Robb (Bitbucket: EionRobb, GitHub: EionRobb).


Mobile/Google Voice contacts are separate to Hangouts contacts - I haven't found any link between the two when looking at the information that comes out of contacts.google.com

You can merge the GV/Hangouts buddies in Pidgin into a single Contact though, which will let you switch between sending an SMS and sending a Hangouts, if that helps?

EionRobb commented 7 years ago

Original comment by Jake Magee (Bitbucket: jake_magee, ).


Ah... I see that now. Thanks for the info. Is there any way to search or retrieve the mobile/google voice contacts? I realize that's kind of a stretch request for a hangouts specific plugin.

I did notice the merge feature, but the problem is that only one of my many contacts actually use hangouts. I'm using this plugin as a much better way of sending/receiving SMS with my google voice number on my computer (compared to having a hangouts or gmail browser tab open).

Thanks

EionRobb commented 7 years ago

Original comment by Eion Robb (Bitbucket: EionRobb, GitHub: EionRobb).


It looks like the "search for friends" api returns information for SMS-only contacts too. Have you tried messaging someone in your contact list through that?

EionRobb commented 7 years ago

Original comment by Jake Magee (Bitbucket: jake_magee, ).


It doesn't appear to list my SMS-only contacts. I can find the contact "ID" number for the SMS by messaging the person via hangouts.google.com, and when the window pops up in pidgin, I can "get info" for that contact which of course has the "ID" number. When i "search for friends", that ID number is no where in the list. Also if I use the correct "ID" number in the "search for friends", it doesn't find it either.

And If I search for the contacts SMS phone number in "search for friends", it will display the hangouts contact, but that contact won't work for SMS. It has a different "ID" number and doesn't display the phone icon.

To add the contact, I have to use "add buddy", then use that SMS "ID" for the buddy's username. The new contact still won't have a phone icon, but after I disable and re-enable the plugin, it will have the phone icon and everything works fine.

EionRobb commented 7 years ago

Original comment by Eion Robb (Bitbucket: EionRobb, GitHub: EionRobb).


Do they show up on your contact list at https://contacts.google.com/ ?

Adding in a option to start a new SMS message with someone sounds like the feature request here... would that work?

EionRobb commented 7 years ago

Original comment by Jake Magee (Bitbucket: jake_magee, ).


Yes, they do show up at contacts.google.com.

I believe the option to start a new conversation via SMS would work. Could we have a setting to define the default conversation type (SMS or hangouts) and maybe a right click option to start a non-default conversation?

EionRobb commented 7 years ago

Original comment by Kai Larsen (Bitbucket: anaxonda, GitHub: anaxonda).


I'm having this issue as well, did you make any progress on it?

EionRobb commented 7 years ago

Original comment by Eion Robb (Bitbucket: EionRobb, GitHub: EionRobb).


I haven't made any progress on this, no :(

What would help would be if I could replicate the setup. What's involved in creating a contact that works with both hangouts and sms like that?

EionRobb commented 7 years ago

Original comment by Kai Larsen (Bitbucket: anaxonda, GitHub: anaxonda).


Not sure, I wish I could help.

EionRobb commented 7 years ago

Original comment by Daniel Lenski (Bitbucket: [Daniel Lenski](https://bitbucket.org/Daniel Lenski), ).


The only way I can get a contact to show up as mobile is to use hangouts to send them an SMS, which then shows up with a unique contact ID that has no contact information other than the phone number.

I added the phone numbers for SMS contact in PR #4.

Is there a problem with how my google contact information is stored?

I've done some research into this. As far as I can tell, the Google Hangouts API does not store any information on SMS contacts other than their phone numbers. For "real" Hangouts contacts (Gaia) the Hangouts API merges in information from the Google Contacts API automatically.

In order to display additional information on SMS contacts, the official Google apps (Hangouts for Android, Gmail, standalone, etc.) access the separate Google Contacts API to "fill in the blanks" for those contacts.

No idea why they designed it like this :frowning:. My guess is that the SMS contact support was bolted on as a bit of an afterthought, in order to integrated with Google Voice. It's unlikely to ever be improved, since Google is very clearly moving away from Hangouts-SMS integration.

It looks like the "search for friends" api returns information for SMS-only contacts too.

That is correct, however you must search by phone number in order for them to show up.

Mobile/Google Voice contacts are separate to Hangouts contacts - I haven't found any link between the two when looking at the information that comes out of contacts.google.com

That's right. As far as I can tell, what the Google Hangouts Android app does when you access an SMS chat is… it uses the separate Google Contacts API to search for that contact by its phone number. Sometimes, when the data isn't already cached, you can even see a delay in the user interface before it updates the contact's information.

Conclusion: the only way for purple-hangouts to get more complete information about SMS contacts would be to call the Google Contacts or Google People APIs, which are extremely different in structure and design from the Hangouts API, and do a reverse lookup from phone number to name.

EionRobb commented 7 years ago

Original comment by Daniel Lenski (Bitbucket: [Daniel Lenski](https://bitbucket.org/Daniel Lenski), ).


Adding in a option to start a new SMS message with someone sounds like the feature request here... would that work?

That is a good idea! I contributed a bit of code to the Hangups Python library that allows you to look up the Gaia ID for a phone number (in order to create an SMS contact):

https://github.com/tdryer/hangups/blob/master/examples/lookup_entities.py#L26-L37

EionRobb commented 7 years ago

Original comment by Kai Larsen (Bitbucket: anaxonda, GitHub: anaxonda).


No idea why they designed it like this frowning. My guess is that the SMS contact support was bolted on as a bit of an afterthought, in order to integrated with Google Voice. It's unlikely to ever be improved, since Google is very clearly moving away from Hangouts-SMS integration.

Yeah, this is really a bummer for me as sms-hangouts integration allows me to easily manage sms from my phone via hangouts on my computer. When they remove SMS support (in may I believe?) it will render this whole issue with purple-hangouts moot.

EionRobb commented 6 years ago

Original comment by Scott McLeod (Bitbucket: halcyonblue, GitHub: halcyonblue).


SMS support was discontinued for accounts that aren't google voice phone numbers. If you are using hangouts from your google voice phone number, then SMS will continue to work. So not moot for google voice users.