Trim reply fallback when fetching single events

This commit is contained in:
Tulir Asokan 2019-06-16 01:33:51 +03:00
parent 8b5eb1849b
commit ac3b862f23

View file

@ -90,6 +90,7 @@ class MaubotMatrixClient(MatrixClient):
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)
if isinstance(event, MessageEvent): if isinstance(event, MessageEvent):
event.content.trim_reply_fallback()
return MaubotMessageEvent(event, self) return MaubotMessageEvent(event, self)
else: else:
event.client = self event.client = self