Remove callback for nio.UnknownBadEvent
Should this type of event appear, our function to register events won't find the attributes required to process it that are present on normal events.
This commit is contained in:
parent
a1feb2c046
commit
688fdec9d7
|
@ -2357,7 +2357,7 @@ class MatrixClient(nio.AsyncClient):
|
||||||
async def register_nio_event(
|
async def register_nio_event(
|
||||||
self,
|
self,
|
||||||
room: nio.MatrixRoom,
|
room: nio.MatrixRoom,
|
||||||
ev: nio.Event,
|
ev: Union[nio.Event, nio.BadEvent],
|
||||||
event_id: str = "",
|
event_id: str = "",
|
||||||
override_fetch_profile: Optional[bool] = None,
|
override_fetch_profile: Optional[bool] = None,
|
||||||
**fields,
|
**fields,
|
||||||
|
|
|
@ -675,13 +675,6 @@ class NioCallbacks:
|
||||||
await self.client.register_nio_event(room, ev, content=co)
|
await self.client.register_nio_event(room, ev, content=co)
|
||||||
|
|
||||||
|
|
||||||
async def onUnknownBadEvent(
|
|
||||||
self, room: nio.MatrixRoom, ev: nio.UnknownBadEvent,
|
|
||||||
) -> None:
|
|
||||||
co = "%1 sent a malformed event lacking a minimal structure"
|
|
||||||
await self.client.register_nio_event(room, ev, content=co)
|
|
||||||
|
|
||||||
|
|
||||||
async def onUnknownEvent(
|
async def onUnknownEvent(
|
||||||
self, room: nio.MatrixRoom, ev: nio.UnknownEvent,
|
self, room: nio.MatrixRoom, ev: nio.UnknownEvent,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user