Skip to content

Commit

Permalink
Use create_offnetwork_gaia when requesting users
Browse files Browse the repository at this point in the history
Use create_offnetwork_gaia and entity_results for the getentitybyid
request. See tdryer#229.
  • Loading branch information
tdryer committed Apr 13, 2016
1 parent 46b985b commit ef2a471
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hangups/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ def build_user_conversation_list(client):
hangouts_pb2.GetEntityByIdRequest(
request_header=client.get_request_header(),
batch_lookup_spec=[
hangouts_pb2.EntityLookupSpec(gaia_id=user_id.gaia_id)
hangouts_pb2.EntityLookupSpec(
gaia_id=user_id.gaia_id,
create_offnetwork_gaia=True,
)
for user_id in required_user_ids
],
)
)
required_entities = list(response.entity)
for entity_result in response.entity_result:
required_entities.extend(entity_result.entity)
except exceptions.NetworkError as e:
logger.warning('Failed to request missing users: {}'.format(e))

Expand Down

0 comments on commit ef2a471

Please sign in to comment.