💾 Archived View for blakes.dev › hdoc › WaOUus4PTrWtDhH45o0U1A.source.txt captured on 2024-05-10 at 10:57:40.

View Raw

More Information

-=-=-=-=-=-=-

---
title: Thoughts on the current state of Matrix-as-MIMI
---
The most recent [Matrix-as-MIMI ("Matrix as a Messaging Framework" or "Linearized Matrix") document](https://turt2live.github.io/ietf-mimi-matrix-framework/draft-ralston-mimi-matrix-framework.html) I can find is more or less a summary of Matrix as it is. In my opinion, this is bad.



In all honesty, I'd like to write a better spec, but I don't know enough about the federation mechanics to do that. Such a spec should be heavily inspired by, but ultimately independent from, the existing Matrix spec; basically, a summarized version, but complete, better, and respective of existing, easy to use standards like MIME types.

---
## Possible MIME structures
Irrelevant fields omitted.

{

"type": "text/plain",

"content": {

// `body` is used as a JSON-stringified body. It could be binary.

"body": "This is a plain text body.",

"m.automated": true

}

}


{

"type": "multipart/alternate",

"content": {

// Multipart types use `parts`, where each item is a part

"parts": [

{

"type": "text/markdown; variant=CommonMark; lang=en_US",

"body": "# This is a CommonMark document in English!"

},

{

"type": "text/markdown",

"body": "This is probably original or GFM markdown, and it could be in any language. Don't allow any special formatting."

}

]

}

}


{

"type": "application/json",

"content": {

// JSON types do not use the body field

"first": "John",

"last": "Doe",

"age": 48

}

}


{

"type": "image/png",

"content": {

// you can use url in place of body to look up the contents; usually this is only done for media types but no such mandate is made

"url": "https://example.org/cat.png"

}

}