mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 15:42:10 +03:00
refactor: Remove Message.set_file() / dc_msg_set_file() and related code (#6558)
Now that we are deduplicating everywhere, we can get rid of some code. The old python bindings did not get an optional `name` parameter because they are deprecated anyway, but it would be easy to add it.
This commit is contained in:
@@ -118,7 +118,7 @@ class Message:
|
||||
mtype = ffi.NULL if mime_type is None else as_dc_charpointer(mime_type)
|
||||
if not os.path.exists(path):
|
||||
raise ValueError(f"path does not exist: {path!r}")
|
||||
lib.dc_msg_set_file(self._dc_msg, as_dc_charpointer(path), mtype)
|
||||
lib.dc_msg_set_file_and_deduplicate(self._dc_msg, as_dc_charpointer(path), ffi.NULL, mtype)
|
||||
|
||||
@props.with_doc
|
||||
def basename(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user