Beispiel #1
0
 def send_is_typing(self, peer_jid: str, is_typing: bool):
     if self.is_group_jid(peer_jid):
         return self.send_xmpp_element(
             chatting.OutgoingGroupIsTypingEvent(peer_jid, is_typing))
     else:
         return self.send_xmpp_element(
             chatting.OutgoingIsTypingEvent(peer_jid, is_typing))
Beispiel #2
0
    def send_is_typing(self, peer_jid: str, is_typing: bool):
        """
        Updates the 'is typing' status of the bot during a conversation.

        :param peer_jid: The JID that the notification will be sent to
        :param is_typing: If true, indicates that we're currently typing, or False otherwise.
        """
        if self.is_group_jid(peer_jid):
            return self._send_xmpp_element(
                chatting.OutgoingGroupIsTypingEvent(peer_jid, is_typing))
        else:
            return self._send_xmpp_element(
                chatting.OutgoingIsTypingEvent(peer_jid, is_typing))