Fix potential await bug
This commit is contained in:
parent
f94638a937
commit
2844865e3a
@ -112,12 +112,12 @@ class MaubotMatrixClient(MatrixClient):
|
|||||||
except (KeyError, ValueError):
|
except (KeyError, ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def call_handlers(self, event: Event) -> Awaitable[None]:
|
async def call_handlers(self, event: Event) -> None:
|
||||||
if isinstance(event, MessageEvent):
|
if isinstance(event, MessageEvent):
|
||||||
if event.sender == self.mxid:
|
if event.sender == self.mxid:
|
||||||
return
|
return
|
||||||
event = MaubotMessageEvent(event, self)
|
event = MaubotMessageEvent(event, self)
|
||||||
return super().call_handlers(event)
|
return await super().call_handlers(event)
|
||||||
|
|
||||||
async def get_event(self, room_id: RoomID, event_id: EventID) -> Event:
|
async def get_event(self, room_id: RoomID, event_id: EventID) -> Event:
|
||||||
event = await super().get_event(room_id, event_id)
|
event = await super().get_event(room_id, event_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user