Skip to content

Commit

Permalink
invite users
Browse files Browse the repository at this point in the history
  • Loading branch information
kmh11 committed Nov 24, 2017
1 parent bbe7904 commit 166056d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pearl/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@ def send(self, message, eid):
segment=[seg.serialize() for seg in segment]
)
)
yield from self.client.send_chat_message(request)
yield from self.client.send_chat_message(request)

@asyncio.coroutine
def invite(self, accounts, eid):
request = hangups.hangouts_pb2.AddUserRequest(
request_header=self.client.get_request_header(),
invitee_id=[hangups.hangouts_pb2.InviteeID(gaia_id=account["gaia_id"]) for account in self.accounts if
account != self.account],
event_request_header=hangups.hangouts_pb2.EventRequestHeader(
conversation_id=hangups.hangouts_pb2.ConversationId(
id=self.conversation_id
),
client_generated_id=self.client.get_client_generated_id(),
),
)
yield from self.client.add_user(request)

0 comments on commit 166056d

Please sign in to comment.