How to use the deltachat.Message function in deltachat

To help you get started, we’ve selected a few deltachat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deltachat / deltabot / src / deltabot / bot.py View on Github external
def get_reply_messages(self):
        for text, file in self._replies:
            if file:
                view_type = "file"
            else:
                view_type = "text"
            msg = Message.new_empty(self.account, view_type)
            if text is not None:
                msg.set_text(text)
            if file is not None:
                msg.set_file(file)
            yield msg