Beispiel #1
0
    def setfocus(self, conversation_id):
        """Set focus to a conversation.

        Raises hangups.NetworkError if the request fails.
        """
        request = hangouts_pb2.SetFocusRequest(
            request_header=self._get_request_header_pb(),
            conversation_id=hangouts_pb2.ConversationId(id=conversation_id),
            type=hangouts_pb2.FOCUS_TYPE_FOCUSED,
            timeout_secs=20,
        )
        response = hangouts_pb2.SetFocusResponse()
        yield from self._pb_request('conversations/setfocus', request,
                                    response)
        return response
Beispiel #2
0
 def set_focus(self, set_focus_request):
     """Set focus to a conversation."""
     response = hangouts_pb2.SetFocusResponse()
     yield from self._pb_request('conversations/setfocus',
                                 set_focus_request, response)
     return response