-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When enable_authenticated_media is set to true in Synapse (the new default as of Synapse 1.120+), media uploaded to the server is only accessible via the authenticated endpoints (/_matrix/client/v1/media/download/...
). However, the matrix-bot-sdk
currently appears to request media from older endpoints like /_matrix/media/v3/download/...
, which yields a 404 Not Found
for newly uploaded “authenticated” media.
To Reproduce
- In Synapse’s
homeserver.yaml
, setenable_authenticated_media: true
(or use a version of Synapse where it’s on by default). - Start a bot using
matrix-bot-sdk
. - Have a user upload an image or file to that server.
- The bot calls
downloadContent()
or usesmxcToHttp()
, which tries the legacy endpoint/_matrix/media/v3/download/....
- Synapse returns 404 because the requested media is marked authenticated and no longer served on the old endpoint.
Expected behavior
Use the new /_matrix/client/v1/media/download/...
endpoint automatically when requesting an authenticated media.
Log snippet
The bot receives 404 Not Found
from Synapse when trying to download new media.
MatrixHttpClient (REQ-XX)
{
"errcode": "M_NOT_FOUND",
"error": "Not found"
}
Additional context
Refer to Synapse Docs for more information
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working