mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-03 17:59:19 +02:00
Merge pull request #393 from deltachat/cleanup3
remove deprecated dc_send_X_msg() functions
This commit is contained in:
commit
25e157b71f
3 changed files with 3 additions and 279 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue