コード例 #1
0
ファイル: conversation.py プロジェクト: thannemann/hangups
 def _handle_set_typing_notification(self, set_typing_notification):
     """Receive SetTypingNotification and update the conversation."""
     conv_id = set_typing_notification.conversation_id.id
     conv = self._conv_dict.get(conv_id, None)
     if conv is not None:
         res = parsers.parse_typing_status_message(set_typing_notification)
         yield from self.on_typing.fire(res)
         yield from conv.on_typing.fire(res)
     else:
         logger.warning("Received SetTypingNotification for " "unknown conversation {}".format(conv_id))
コード例 #2
0
 def _handle_set_typing_notification(self, set_typing_notification):
     """Receive ClientSetTypingNotification and update the conversation."""
     conv_id = set_typing_notification.conversation_id.id_
     conv = self._conv_dict.get(conv_id, None)
     if conv is not None:
         res = parsers.parse_typing_status_message(set_typing_notification)
         yield from self.on_typing.fire(res)
         yield from conv.on_typing.fire(res)
     else:
         logger.warning('Received ClientSetTypingNotification for '
                        'unknown conversation {}'.format(conv_id))
コード例 #3
0
ファイル: conversation.py プロジェクト: trollkarlen/hangups
 def _handle_set_typing_notification(self, set_typing_notification):
     """Receive ClientSetTypingNotification and update the conversation."""
     conv_id = set_typing_notification.conversation_id.id_
     conv = self._conv_dict.get(conv_id, None)
     if conv is not None:
         res = parsers.parse_typing_status_message(set_typing_notification)
         self.on_typing.fire(res)
         conv.on_typing.fire(res)
     else:
         logger.warning('Received ClientSetTypingNotification for '
                        'unknown conversation {}'.format(conv_id))
コード例 #4
0
ファイル: conversation.py プロジェクト: cp9/hangups
    def _handle_set_typing_notification(self, set_typing_notification):
        """Receive SetTypingNotification and update the conversation.

        Args:
            set_typing_notification: hangouts_pb2.SetTypingNotification
                instance
        """
        conv_id = set_typing_notification.conversation_id.id
        try:
            conv = yield from self._get_or_fetch_conversation(conv_id)
        except exceptions.NetworkError:
            logger.warning(
                'Failed to fetch conversation for typing notification: %s',
                conv_id)
        res = parsers.parse_typing_status_message(set_typing_notification)
        yield from self.on_typing.fire(res)
        yield from conv.on_typing.fire(res)
コード例 #5
0
ファイル: conversation.py プロジェクト: tdryer/hangups
    async def _handle_set_typing_notification(self, set_typing_notification):
        """Receive SetTypingNotification and update the conversation.

        Args:
            set_typing_notification: hangouts_pb2.SetTypingNotification
                instance
        """
        conv_id = set_typing_notification.conversation_id.id
        res = parsers.parse_typing_status_message(set_typing_notification)
        await self.on_typing.fire(res)
        try:
            conv = await self._get_or_fetch_conversation(conv_id)
        except exceptions.NetworkError:
            logger.warning(
                'Failed to fetch conversation for typing notification: %s',
                conv_id
            )
        else:
            await conv.on_typing.fire(res)