Don't re-wrap events if they're re-dispatched
This commit is contained in:
parent
ebd4ae9f55
commit
0a47d1929a
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ class MaubotMatrixClient(MatrixClient):
|
||||||
return self.send_message(room_id, content, **kwargs)
|
return self.send_message(room_id, content, **kwargs)
|
||||||
|
|
||||||
def dispatch_event(self, event: Event, source: SyncStream) -> List[asyncio.Task]:
|
def dispatch_event(self, event: Event, source: SyncStream) -> List[asyncio.Task]:
|
||||||
if isinstance(event, MessageEvent):
|
if isinstance(event, MessageEvent) and not isinstance(event, MaubotMessageEvent):
|
||||||
event = MaubotMessageEvent(event, self)
|
event = MaubotMessageEvent(event, self)
|
||||||
elif source != SyncStream.INTERNAL:
|
elif source != SyncStream.INTERNAL:
|
||||||
event.client = self
|
event.client = self
|
||||||
|
|
Loading…
Reference in a new issue