matrix-react-sdk icon indicating copy to clipboard operation
matrix-react-sdk copied to clipboard

Add basic support for attachments (as per MSC2881)

Open chayleaf opened this issue 4 years ago • 2 comments

Type: enhancement

See https://github.com/matrix-org/matrix-doc/pull/2881/

Ideally, m.relates_to needs to be an array for multiple attachments to work, and to implement file/image replies properly, but that would require way more changes (including in Synapse) to make all relations code work with arrays. Currently, I just show "In reply to" without the message actually being a reply.

In this implementation, if any text is already in the composer during upload, files get sent as an attachment (and after they finish uploading, text gets sent immediately). Naturally, a better UI will be needed.


Here's what your changelog entry will look like:

✨ Features

  • Add basic support for attachments (as per MSC2881) (#6683). Contributed by @chayleaf.

Preview: https://612723cb1e11b2602d882f7e--matrix-react-sdk.netlify.app ⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

chayleaf avatar Aug 25 '21 23:08 chayleaf

I think of implementing https://github.com/matrix-org/matrix-doc/pull/3051 support first, as it's necessary for supporting image replies/multiple attachments. Single relation is pretty limiting here. Hence, I'll convert this into a draft PR for now.

chayleaf avatar Sep 03 '21 05:09 chayleaf

I'm going to unassign from Design and Product for now until there are some screenshots/gifs to review

kittykat avatar Feb 22 '22 15:02 kittykat