hangups icon indicating copy to clipboard operation
hangups copied to clipboard

Google Voice contacts show phone number instead of name

Open baskervald opened this issue 10 years ago • 23 comments

Many people (including myself) link their Google Voice numbers to their Google Hangouts, so they can text from Hangouts. The way the official clients work is, they check the numbers in your Contacts and let you know whose number it is in the list, so the hangouts API doesn't deliver that data.

 Conversations   Lexina Ero   +1704574XXXX                                                                                                                     
  < Lexina Ero (2)                                                                                                                                          >
  < +1704574XXXX                                                                                                                                            >
  < +1940395XXXX                                                                                                                                            >
  < +1 704-777-XXXX                                                                                                                                         >
  < +1 704-780-XXXX                                                                                                                                         >
  < +1704989XXXX                                                                                                                                            >
  < (704) 456-XXXX                                                                                                                                          >
  < +1 704-315-XXXX                                                                                                                                         >
  < (704) 995-XXXX                                                                                                                                          >
  < +1980216XXXX                                                                                                                                            >
  < +1 980-229-XXXX                                                                                                                                         >
  < +1704287XXXX                                                                                                                                            >
  < +1 704-242-XXXX                                                                                                                                         >
  < +1704576XXXX                                                                                                                                            >
  < +1 704-526-XXXX                                                                                                                                         >
  < (980) 322-XXXX                                                                                                                                          >
  < +1 347-683-XXXX                                                                                                                                         >
  < +1 704-774-XXXX                                                                                                                                         >
  < +1 980-228-XXXX                                                                                                                                         >
  < +1 704-222-XXXX                                                                                                                                         >
  < +1704858XXXX                                                                                                                                            >

For reference, that's how the list looks for me now. As you can see, the numbers can have multiple different formats depending on how they're entered, so, depending on how Google Contacts handles it, some conversion may be necessary.

I would recommend implementing it as a check on startup, and perhaps adding a keybind to refresh them, if you had added someone to your contacts while the app was open (maybe allow you to add them from within the app as well?)

baskervald avatar Jan 11 '15 23:01 baskervald

How could I help with this bug? Are there network logs or something I could grab for you? Also it seems like somewhere in the fixes for #4, the contact's phone numbers are no longer displayed and instead it just shows "Unknown" for every Google Voice contact. I don't know which bug to post that on here though.

addisonamiri avatar Nov 19 '15 23:11 addisonamiri

A log of the requests used to retrieve the contacts would be useful.

tdryer avatar Nov 20 '15 03:11 tdryer

Am I doing something wrong in that I just get them all as "Unknown"?

uriel1998 avatar Nov 22 '15 21:11 uriel1998

@uriel1998 No. That's an issue currently

baskervald avatar Nov 22 '15 23:11 baskervald

@AshenDrops Herm. I'm just pulling from github. Rats. I may have to completely pull it out and reinstall it just to make sure I didn't jack something up.

uriel1998 avatar Nov 23 '15 22:11 uriel1998

@uriel1998 Ah, sorry. What I meant is that it's currently an unfixed issue where all Google Voice chats show up as "Unknown". It's present in the latest version

baskervald avatar Nov 23 '15 23:11 baskervald

Oh, okay. I was just looking at the screengrab earlier where it presented phone numbers, which, while not idea, would have been at least okay....

On Mon, Nov 23, 2015 at 6:58 PM, Ashen [email protected] wrote:

@uriel1998 https://github.com/uriel1998 Ah, sorry. What I meant is that it's currently an unfixed issue where all Google Voice chats show up as "Unknown"

— Reply to this email directly or view it on GitHub https://github.com/tdryer/hangups/issues/52#issuecomment-159108254.

Steven Saus GPG key ID: 0xDD2F731F http://stevesaus.com http://alliterationink.com http://ideatrash.net Allow 48 hours for a reply

Your EULA doesn't apply: http://bit.ly/noeula

uriel1998 avatar Nov 24 '15 15:11 uriel1998

Yeah. It was an error introduced at some point or another

baskervald avatar Nov 25 '15 19:11 baskervald

Anyone know what version of hangups made the phone numbers disappear? It might be easy to bring them back, but I'm not sure how it was working in the first place.

tdryer avatar Nov 26 '15 03:11 tdryer

I think it was one of the commits around #4 but I may be wrong. My guess is that the gvoice contacts have a different structure than the normal ones so they're be deserialized incorrectly causing an exception that results in the "Unknown" though that's a completely baseless assumption and I can't seem to find the __main__.py that is referenced by the issue.

addisonamiri avatar Nov 28 '15 19:11 addisonamiri

Would it be feasible/desirable to integrate with something like ppl, a commandline contacts manager?

On Sat, Nov 28, 2015 at 2:14 PM, Addison Amiri [email protected] wrote:

I think it was one of the commits around #4 https://github.com/tdryer/hangups/issues/4 but I may be wrong. My guess is that the gvoice contacts have a different structure than the normal ones so they're be deserialized incorrectly causing an exception that results in the "Unknown" though that's a completely baseless assumption and I can't seem to find the main.py that is referenced by the issue.

— Reply to this email directly or view it on GitHub https://github.com/tdryer/hangups/issues/52#issuecomment-160330013.

Steven Saus GPG key ID: 0xDD2F731F http://stevesaus.com http://alliterationink.com http://ideatrash.net Allow 48 hours for a reply

Your EULA doesn't apply: http://bit.ly/noeula

uriel1998 avatar Dec 04 '15 03:12 uriel1998

Interesting idea, I haven't heard of ppl before. We'd have to fix this issue first thought, otherwise there would be nothing to correlate the contacts between hangups and ppl.

tdryer avatar Dec 04 '15 03:12 tdryer

Is there a way to allow users to edit the name of the conversation client side so that we can at least work around the 'Unknown' issue? This would also be a nice feature when users would like to add nicknames.

blitzaxt avatar Dec 10 '15 19:12 blitzaxt

There's no support for custom client side names, but it would be possible to implement.

tdryer avatar Dec 11 '15 03:12 tdryer

@bolens1112 One thing you can do is add a "name" to the conversation. Go into the conversation and press Ctrl+N, then change the conversation name using the menu provided.

It won't change the actual person's name within the conversation, but it will change the tab name and the name in the list.

Note that if you do this on normal hangouts conversations the name will be set for the chat as a whole and seen by everyone.

baskervald avatar Dec 31 '15 03:12 baskervald

@baskervald That sounds good, but does that mean that if I name a conversation 'wife' it will show as 'wife' for the person on the other end as well?

blitzaxt avatar Jan 04 '16 15:01 blitzaxt

That sounds good, but does that mean that if I name a conversation 'wife' it will show as 'wife' for the person on the other end as well?

Yes, it changes the conversation name on the server-side.

tdryer avatar Jan 09 '16 00:01 tdryer

For anyone having issues with Google Voice contacts, #200 is a possible fix.

tdryer avatar Jan 09 '16 00:01 tdryer

@bolens1112 It will show as "wife" for Google Hangouts contacts, but not for Google Voice contacts

baskervald avatar Jan 10 '16 02:01 baskervald

I'd like to update this with the fact that Google does indeed use a private People v2 API to lookup metadata matching the phone number to a name -- typically only if they exist in your contacts, but it seems like it also has names for numbers that don't as well.

Here's a sample response bit:

    "phone": [
     {
      "metadata": {
       "writeable": true,
       "container": "CONTACT",
       "containerType": "CONTACT",
       "containerId": "8079549805121237877",
       "encodedContainerId": "702053bd8f53f375",
       "primary": true,
       "containerPrimary": true
      },
      "value": "<phone number>",
      "type": "mobile",
      "formattedType": "Mobile",
      "canonicalizedForm": "<phone number>",
      "uri": "tel:<phone number>",
      "extendedData": {
       "structuredPhone": {
        "phoneNumber": {
         "e164": "<phone number>",
         "i18nData": {
          "nationalNumber": "<phone number>",
          "internationalNumber": "<phone number>",
          "countryCode": 1,
          "regionCode": "US",
          "isValid": true,
          "validationResult": "IS_POSSIBLE"
         }
        },
        "type": "mobile"
       }
      }
     }
    ],

In addition, the lookup API is the only way to transform a phone number into a GAIA ID which is needed to start a new SMS conversation.

avaidyam avatar Jul 20 '17 00:07 avaidyam

Has any improvement been made on this issue? #200 has not made any changes for me. Some conversations through voice have names, and some don't. This is what it looks like for me:

  < 19********* [Google Voice]                                                                                            >  
  < Ethan [Hangouts]                                                                                                      >  
  < Esec [Hangouts]                                                                                                       >  
  < +17********* [Google Voice]                                                                                           >  
  < +17********* [Google Voice]                                                                                           >  
  < Jason [Google Voice]                                                                                                  >  
  < Lauren [Google Voice]                                                                                                 >  
  < (7**) ***-**** [Google Voice]                                                                                         >  
  < Sophia [Google voice                                                                                                  >  
  < 7********* [Google voice]                                                                                             >  
  < Jacob [Google voice]               

cool00geek avatar Feb 13 '18 01:02 cool00geek

I'd like to update this with the fact that Google does indeed use a private People v2 API to lookup metadata matching the phone number to a name -- typically only if they exist in your contacts, but it seems like it also has names for numbers that don't as well.

@avaidyam, do you have any more details on the API endpoint used?

dlenski avatar Apr 30 '18 20:04 dlenski

@dlenski Here's my implementation.

avaidyam avatar May 01 '18 01:05 avaidyam