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))
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))
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))
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)
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)