Support UnknownEvent and UnknownEncryptedEvent

This commit is contained in:
miruka 2019-12-04 18:20:30 -04:00
parent 2fe8c80aa5
commit 9d89409379

View File

@ -337,10 +337,20 @@ class NioCallbacks:
async def onUnknownBadEvent(self, room, ev) -> None: async def onUnknownBadEvent(self, room, ev) -> None:
co = "%1 sent a malformed event lacking the minimal structure."
await self.client.register_nio_event(room, ev, content=co)
async def onUnknownEvent(self, room, ev) -> None:
co = "%1 sent an event this client doesn't understand." co = "%1 sent an event this client doesn't understand."
await self.client.register_nio_event(room, ev, content=co) await self.client.register_nio_event(room, ev, content=co)
async def onUnknownEncryptedEvent(self, room, ev) -> None:
co = "%1 sent an event this client doesn't know how to decrypt."
await self.client.register_nio_event(room, ev, content=co)
# Callbacks for nio invite events # Callbacks for nio invite events
async def onInviteEvent(self, room, ev) -> None: async def onInviteEvent(self, room, ev) -> None: