matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
197 stars 97 forks source link

Two requests for sending media is painful for clients #868

Open turt2live opened 3 years ago

turt2live commented 3 years ago

Clients which want to show a simple error state for upload/message sending failed are stuck trying to aggregate the two on their own. Instead, the protocol could somehow support sending the media alongside the message, possibly as a template with attachment. Then, if any part of the upload/send fails, the client simply retries.

A challenge would be encryption, as the server won't have information to put into a template of sorts.

t3chguy commented 3 years ago

A challenge would be encryption, as the server won't have information to put into a template of sorts.

Sure seems quite a big challenge. For e2ee isn't it a notable benefit that the server can't link what mxc goes with what message? They might be able to guess on slower accounts but anything beyond that and it gets inherently hidden.

turt2live commented 3 years ago

some solution may involve ditching the media repo, tbh. Or at least removing it from the loop enough where it's not in the event sending critical path.