iamb icon indicating copy to clipboard operation
iamb copied to clipboard

iamb 0.0.10 (2e6376f) requests image attachments with a deprecated URL scheme

Open dstu opened this issue 1 year ago • 6 comments

In iamb 0.0.10 (2e6376f) (installed via Debian apt), the URLs that iamb requests for images attached to messages are for the /_matrix/media/v3/ endpoints. Per https://spec.matrix.org/unstable/client-server-api/#content-repository, these are in the process of being deprecated. URLs of the form /_matrix/client/v1/media/ should be used, instead. Our server is running matrix-synapse-py3 1.20.2+bullseye1 (also installed via Debian apt).

To reproduce:

  1. Connect to a Matrix server that uses newer image URLs.
  2. Have someone send an image with a message attachment.
  3. Try to download the image (:download in iamb).
  4. Observe that the download fails.
  5. The server's access logs should show that iamb requested a URL with an old-style path component.

dstu avatar Dec 08 '24 03:12 dstu

It looks like this can be solved by updating the matrix-sdk dependency to version 0.8. I have taken a stab at this at https://github.com/dstu/iamb/tree/update_matrix_sdk_0.8. (That builds cleanly and appears to run fine, but I haven't given it a solid shakedown yet.)

Before opening a pull request, I'd like to have a better understanding of changes in the ruma and matrix-sdk crates, to make sure we aren't introducing new bugs. And it might be nice to have an integration test to validate the behavior of :download in the client before opening a pull request. But I'm happy to do so sooner if that seems reasonable.

dstu avatar Dec 09 '24 03:12 dstu

Dupe of #349.

mordquist avatar Dec 09 '24 20:12 mordquist

@dstu: Have been running your update for a couple of weeks with no issues so far. :+1:

mordquist avatar Dec 25 '24 17:12 mordquist

Awesome! Maybe I should just open a PR, then? I haven't had time to try writing tests to verify this specific behavior over the holidays.

dstu avatar Dec 28 '24 16:12 dstu

@dstu, may you?

wvffle avatar Jan 05 '25 20:01 wvffle

Happy to. I haven't had time to figure out writing a test, but better to have the open PR to keep things moving.

dstu avatar Jan 06 '25 01:01 dstu