Description
When a message with an image attached is sent to a room, hookshot's webhook doesn't contain the media file, just mxs://
reference in the event json.
hookshot version: 5.4.2
matrix-synapse version: 1.124.0
(both from NixOS 24.11)
According to my research, this is probably because Synapse enforces Authenticated Media by default and I would prefer not to disable it.
What I found:
Hookshot debug log contains
[OutboundHookConnection] Failed to get media for $<random> in !<room-id>:<example.com> <ref *2> IncomingMessage {...
and
_header: 'GET /_matrix/media/v3/download/<example.com>/<media-id>?allow_remote=true HTTP/1.1\r\n'
which is the "old" media API URL. Authenticated Media API should instead use
GET /_matrix/client/v1/media/download/{serverName}/{mediaId}
The request is ultimately generated by matrix-bot-sdk
method downloadContent
which has the "old" API path hardcoded. The bot sdk last release apparently predates MSC3916.