From f5e8a04fd039eee309b3b9f5f2647b04d98625ca Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 7 Apr 2024 21:57:18 +0000 Subject: [PATCH] api(deltachat-rpc-client): return Message from Message.send_reaction() --- deltachat-rpc-client/src/deltachat_rpc_client/message.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/message.py b/deltachat-rpc-client/src/deltachat_rpc_client/message.py index bca4f1151..95138b693 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/message.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/message.py @@ -22,9 +22,10 @@ class Message: def _rpc(self) -> "Rpc": return self.account._rpc - def send_reaction(self, *reaction: str): + def send_reaction(self, *reaction: str) -> "Message": """Send a reaction to this message.""" - self._rpc.send_reaction(self.account.id, self.id, reaction) + msg_id = self._rpc.send_reaction(self.account.id, self.id, reaction) + return Message(self.account, msg_id) def get_snapshot(self) -> AttrDict: """Get a snapshot with the properties of this message."""