From 924b2b48db4894df75a0fc2357906d3d9e201a1f Mon Sep 17 00:00:00 2001 From: saces Date: Sun, 19 Apr 2026 08:52:33 +0200 Subject: [PATCH] smal: fix sendmessage, return the return value --- mxsmal/src/mxsmal/bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mxsmal/src/mxsmal/bot.py b/mxsmal/src/mxsmal/bot.py index b5b5347..e5140a3 100644 --- a/mxsmal/src/mxsmal/bot.py +++ b/mxsmal/src/mxsmal/bot.py @@ -27,7 +27,7 @@ class SMALBot(SMALApp): data["content"]["body"] = text data["content"]["msgtype"] = "m.text" - await self._sendmessage(data) + return await self._sendmessage(data) async def sendmessagereply(self, roomid, msgid, mxid, text): data = {} @@ -41,7 +41,7 @@ class SMALBot(SMALApp): ] data["content"]["m.relates_to"] = {"m.in_reply_to": {"event_id": msgid}} - await self._sendmessage(data) + return await self._sendmessage(data) async def sendmessagestartthread(self, roomid, msgid, mxid, text): data = {} @@ -54,7 +54,7 @@ class SMALBot(SMALApp): mxid, ] data["content"]["m.relates_to"] = {"rel_type": "m.thread", "event_id": msgid} - await self._sendmessage(data) + return await self._sendmessage(data) async def sendnoticereply(self, roomid, msgid, mxid, text): data = {} @@ -66,7 +66,7 @@ class SMALBot(SMALApp): data["content"]["m.relates_to"]["m.in_reply_to"] = {} data["content"]["m.relates_to"]["m.in_reply_to"]["event_id"] = msgid - await self._sendmessage(data) + return await self._sendmessage(data) async def sendnotice(self, roomid, text): data = {} @@ -75,4 +75,4 @@ class SMALBot(SMALApp): data["content"]["body"] = text data["content"]["msgtype"] = "m.notice" - await self._sendmessage(data) + return await self._sendmessage(data)