vendor: Bump gomatrixserverlib to pull in CreateMediaDownloadRequest

main
Robert Swain 2017-06-01 17:56:30 +02:00
parent a398cdd193
commit 0fff33928e
2 changed files with 12 additions and 1 deletions

2
vendor/manifest vendored
View File

@ -98,7 +98,7 @@
{
"importpath": "github.com/matrix-org/gomatrixserverlib",
"repository": "https://github.com/matrix-org/gomatrixserverlib",
"revision": "c396ef3cc1e546729f7052f1f48e345cc59269f4",
"revision": "b1dfcb3b345cc8410f1a03fec0a1ffe6bd002dcd",
"branch": "master"
},
{

View File

@ -220,3 +220,14 @@ func (fc *Client) LookupServerKeys(
}
return result, nil
}
// CreateMediaDownloadRequest creates a request for media on a homeserver and returns the http.Response or an error
func (fc *Client) CreateMediaDownloadRequest(matrixServer ServerName, mediaID string) (*http.Response, error) {
requestURL := "matrix://" + string(matrixServer) + "/_matrix/media/v1/download/" + string(matrixServer) + "/" + mediaID
resp, err := fc.client.Get(requestURL)
if err != nil {
return nil, err
}
return resp, nil
}