zmqlayer.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:yowsup-zmq 作者: grandcat 项目源码 文件源码
def message_send(self, to, msg):
        """
        Transmit a text message to a recipient.
        :param to:
            mobile number (without + or 00) or Jid of the recipient
        :type to: str
        :param msg:
            message text to transmit.
        :type msg: str|bytes

        :return:
            future for async notification
        """
        if isinstance(msg, str):
            msg = msg.encode("utf-8")

        outgoingMessage = TextMessageProtocolEntity(msg, to=self.normalize_jid(to))
        self.toLower(outgoingMessage)

        # Assume successful transmission
        fut = Future()
        fut.set_result("Done")

        return fut
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号