iamb 0.0.10 (2e6376f) requests image attachments with a deprecated URL scheme
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:
- Connect to a Matrix server that uses newer image URLs.
- Have someone send an image with a message attachment.
- Try to download the image (
:downloadin iamb). - Observe that the download fails.
- The server's access logs should show that iamb requested a URL with an old-style path component.
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.
Dupe of #349.
@dstu: Have been running your update for a couple of weeks with no issues so far. :+1:
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, may you?
Happy to. I haven't had time to figure out writing a test, but better to have the open PR to keep things moving.