Skip to content

Commit

Permalink
Adapt python rpc bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hocuri committed Feb 8, 2025
1 parent 7ec024a commit dead9f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deltachat-rpc-client/src/deltachat_rpc_client/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def send_message(
html: Optional[str] = None,
viewtype: Optional[ViewType] = None,
file: Optional[str] = None,
filename: Optional[str] = None,
location: Optional[tuple[float, float]] = None,
override_sender_name: Optional[str] = None,
quoted_msg: Optional[Union[int, Message]] = None,
Expand All @@ -137,6 +138,7 @@ def send_message(
"html": html,
"viewtype": viewtype,
"file": file,
"filename": filename,
"location": location,
"overrideSenderName": override_sender_name,
"quotedMessageId": quoted_msg,
Expand Down Expand Up @@ -172,13 +174,14 @@ def set_draft(
self,
text: Optional[str] = None,
file: Optional[str] = None,
filename: Optional[str] = None,
quoted_msg: Optional[int] = None,
viewtype: Optional[str] = None,
) -> None:
"""Set draft message."""
if isinstance(quoted_msg, Message):
quoted_msg = quoted_msg.id
self._rpc.misc_set_draft(self.account.id, self.id, text, file, quoted_msg, viewtype)
self._rpc.misc_set_draft(self.account.id, self.id, text, file, filename, quoted_msg, viewtype)

def remove_draft(self) -> None:
"""Remove draft message."""
Expand Down

0 comments on commit dead9f9

Please sign in to comment.