From ad42cd5fdf957be4593b2136955ef789a2f93bc6 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 16 Oct 2018 23:33:13 +0200 Subject: [PATCH] don't use removed send_file_msg but message creation and the generic dc_send_msg --- python/src/deltachat/chatting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/src/deltachat/chatting.py b/python/src/deltachat/chatting.py index 8a85730f..17aeb9eb 100644 --- a/python/src/deltachat/chatting.py +++ b/python/src/deltachat/chatting.py @@ -130,7 +130,9 @@ class Chat(object): """ path = as_dc_charpointer(path) mtype = as_dc_charpointer(mime_type) - msg_id = lib.dc_send_file_msg(self._dc_context, self.id, path, mtype) + msg = Message.new(self._dc_context, "file") + msg.set_file(path, mtype) + msg_id = lib.dc_send_msg(self._dc_context, self.id, msg._dc_msg) if msg_id == 0: raise ValueError("message could not be send, does chat exist?") return Message.from_db(self._dc_context, msg_id)