From a2ab7b3090ea78af8816cff57ddbda6cb1b5ae03 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 13 Sep 2019 19:58:45 -0400 Subject: [PATCH] Add event callback for RoomUnknownMessage --- src/python/matrix_client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 936e586b..cd4d91cb 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -624,6 +624,11 @@ class MatrixClient(nio.AsyncClient): await self.register_nio_event(room, ev, content=co) + async def onRoomMessageUnknown(self, room, ev) -> None: + co = "%1 sent a message this client doesn't understand." + await self.register_nio_event(room, ev, content=co) + + async def onRoomCreateEvent(self, room, ev) -> None: co = "%1 allowed users on other matrix servers to join this room." \ if ev.federate else \