Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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