Skip to content

Commit

Permalink
Support MSC2530 fields in media event types
Browse files Browse the repository at this point in the history
Add `filename`, `format` and `formatted_body` to media event content
types.

Signed-off-by: Joe Groocock <[email protected]>
  • Loading branch information
frebib committed Mar 22, 2024
1 parent 47e2157 commit ba88725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mautrix/types/event/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,13 @@ class LocationInfo(SerializableAttrs):


@dataclass
class MediaMessageEventContent(BaseMessageEventContent, SerializableAttrs):
class MediaMessageEventContent(TextMessageEventContent, SerializableAttrs):
"""The content of a media message event (m.image, m.audio, m.video, m.file)"""

url: Optional[ContentURI] = None
info: Optional[MediaInfo] = None
file: Optional[EncryptedFile] = None
filename: Optional[str] = None

@staticmethod
@deserializer(MediaInfo)
Expand Down

0 comments on commit ba88725

Please sign in to comment.