diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 86d1b94a..5af23af9 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -304,10 +304,24 @@ class MatrixClient(nio.AsyncClient): ev.formatted_body if ev.format == "org.matrix.custom.html" else html.escape(ev.body) ) - TimelineMessageReceived.from_nio(room, ev, content=co) + async def onRoomMessageEmote(self, room, ev, from_past=False) -> None: + co = "%S {}".format(HTML_FILTER.filter_inline( + ev.formatted_body + if ev.format == "org.matrix.custom.html" else html.escape(ev.body) + )) + TimelineEventReceived.from_nio(room, ev, content=co) + + + # async def onRoomMessageImage(self, room, ev, from_past=False) -> None: + # import json; print("RMI", json.dumps( ev.__dict__ , indent=4)) + + # async def onRoomEncryptedImage(self, room, ev, from_past=False) -> None: + # import json; print("REI", json.dumps( ev.__dict__ , indent=4)) + + async def onRoomCreateEvent(self, room, ev, from_past=False) -> None: co = "%S allowed users on other matrix servers to join this room." \ if ev.federate else \ @@ -444,12 +458,13 @@ class MatrixClient(nio.AsyncClient): async def onOlmEvent(self, room, ev, from_past=False) -> None: - co = f"%S hasn't sent your device the keys to decrypt this message." + co = f"%S sent an undecryptable olm message." TimelineEventReceived.from_nio(room, ev, content=co) async def onMegolmEvent(self, room, ev, from_past=False) -> None: - await self.onOlmEvent(room, ev, from_past=False) + co = f"%S sent an undecryptable message." + TimelineEventReceived.from_nio(room, ev, content=co) async def onBadEvent(self, room, ev, from_past=False) -> None: diff --git a/src/qml/UI.qml b/src/qml/UI.qml index 3cba8687..b1b52dc0 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -78,7 +78,8 @@ Item { "@test_mary:matrix.org", "Rooms", // "!TSXGsbBbdwsdylIOJZ:matrix.org" // st - "!VDSsFIzQnXARSCVNxS:matrix.org" // hs + // "!VDSsFIzQnXARSCVNxS:matrix.org" // hs + "!XhxUcnVhVhUHkBZEIL:matrix.org" // nc // "Invites", // "!xjqvLOGhMVutPXpAqi:matrix.org" )