From 18d98d643bc19867a8324a201e6f5caa6ea437d8 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 7 Apr 2024 21:06:59 +0000 Subject: [PATCH] api(deltachat-rpc-client): add Chat.send_file() --- deltachat-rpc-client/src/deltachat_rpc_client/chat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/chat.py b/deltachat-rpc-client/src/deltachat_rpc_client/chat.py index 1a7af80e2..7bcaba48f 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/chat.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/chat.py @@ -142,6 +142,10 @@ class Chat: msg_id = self._rpc.misc_send_text_message(self.account.id, self.id, text) return Message(self.account, msg_id) + def send_file(self, path): + """Send a file and return the resulting Message instance.""" + return self.send_message(file=path) + def send_videochat_invitation(self) -> Message: """Send a videochat invitation and return the resulting Message instance.""" msg_id = self._rpc.send_videochat_invitation(self.account.id, self.id)