diff --git a/main.py b/main.py index 313929f..cc26aa0 100644 --- a/main.py +++ b/main.py @@ -78,10 +78,24 @@ class MatrixClient(object): } if reply_id: + reply_event = await matrix_client.room_get_event( + config["room_id"], reply_id + ) + + reply_event = reply_event.event.source["content"]["body"] + content["m.relates_to"] = { "m.in_reply_to": {"event_id": reply_id}, } + content["format"] = "org.matrix.custom.html" + + content["formatted_body"] = (f"""
+In reply to +{config["username"]}
+{reply_event}
{message} +""") + if edit_id: content["body"] = f" * {message}"