Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MSC2530 fields in media event types #170

Merged
merged 1 commit into from
Mar 28, 2024
Merged

Conversation

frebib
Copy link
Contributor

@frebib frebib commented Mar 22, 2024

Add filename, format and formatted_body to media event content types.

frebib added a commit to frebib/maubot-xkcd that referenced this pull request Mar 22, 2024
Required until mautrix/python#170 is merged and
pulled into maubot.

Signed-off-by: Joe Groocock <[email protected]>
CHANGELOG.md Outdated Show resolved Hide resolved
mautrix/types/event/message.py Outdated Show resolved Hide resolved
mautrix/types/event/message.py Outdated Show resolved Hide resolved
@frebib
Copy link
Contributor Author

frebib commented Mar 22, 2024

Much simpler

@frebib
Copy link
Contributor Author

frebib commented Mar 22, 2024

Oh, I'm gonna have to reorder a few bits to make this one, please hold

@frebib frebib marked this pull request as draft March 22, 2024 21:16
Add `filename`, `format` and `formatted_body` to media event content
types.

Signed-off-by: Joe Groocock <[email protected]>
@frebib
Copy link
Contributor Author

frebib commented Mar 22, 2024

Python 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mautrix.types import Format, MediaMessageEventContent
>>> MediaMessageEventContent(filename="aaa.jpg", body="aaa", format=Format.HTML, formatted_body="aaa").serialize()
{'body': 'aaa', 'format': 'org.matrix.custom.html', 'formatted_body': 'aaa', 'filename': 'aaa.jpg'}

@frebib frebib marked this pull request as ready for review March 22, 2024 21:19
frebib added a commit to frebib/maubot-xkcd that referenced this pull request Mar 22, 2024
Required until mautrix/python#170 is merged and
pulled into maubot.

Signed-off-by: Joe Groocock <[email protected]>
@tulir tulir merged commit 8eca64e into mautrix:master Mar 28, 2024
4 checks passed
@frebib frebib deleted the msc2530 branch March 28, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants