feat: super crude way to throw errors when sending

This commit is contained in:
əlemi 2024-01-29 19:59:44 +01:00
parent eac41d01e6
commit d039f313c6
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -104,8 +104,12 @@ class AppService:
json=mx_message(text),
) as res:
doc = await res.json()
if "event_id" in doc:
self.logger.debug("sent message %s to %s as %s : %s", text, room, mxid, doc)
return doc["event_id"]
else:
self.logger.error("failed sending message: %s", doc)
raise ValueError(doc)
async def redact_message(self):
raise NotImplementedError