diff --git a/xkcd.py b/xkcd.py index 4f1d7bc..2ded980 100644 --- a/xkcd.py +++ b/xkcd.py @@ -42,6 +42,13 @@ Image = None +@dataclass +class MSC2530MediaMessageEventContent(MediaMessageEventContent): + filename: str = None + formatted_body: str = None + format: Format = None + + @dataclass class XKCDInfo(SerializableAttrs): year: str @@ -246,7 +253,7 @@ async def _send_xkcd(self, room_id: RoomID, xkcd: XKCDInfo) -> None: content["license_url"] = "https://xkcd.com/license.html" await self.client.send_message(room_id, content) else: - content = MediaMessageEventContent( + content = MSC2530MediaMessageEventContent( msgtype=MessageType.IMAGE, format=Format.HTML, external_url=f"https://xkcd.com/{xkcd.num}",