Skip to content

Clarify that format is required if formatted_body is specified #2167

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Jun 24, 2025

The current spec of format and formatted_body dates back to matrix-org/matrix-spec-proposals#1397 which documented the status quo at the time. It includes an explicit note that formatted_body is required if format is specified but doesn't state whether or not formatted_body can occur without format.

I assume the intention was for formatted_body not to be allowed without format as clients would have struggled to infer the format from just formatted_body if further formats had ever been introduced. As further evidence, ruma doesn't allow one of the two to be optional without the other and Element Web will simply fall back to body if formatted_body is specified without format.

Pull Request Checklist

Preview: https://pr2167--matrix-spec-previews.netlify.app

@Johennes Johennes changed the title Clarify that format is required if formatted_body is specifed Clarify that format is required if formatted_body is specified Jun 24, 2025
@Johennes Johennes marked this pull request as ready for review June 24, 2025 06:29
@Johennes Johennes requested a review from a team as a code owner June 24, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant