ensure thumbnail dimensions are integer, fixes #203

This commit is contained in:
Bruno Windels 2021-02-11 11:15:20 +01:00
parent 430da8766f
commit ac1bbb3937

View file

@ -28,7 +28,7 @@ export class MediaRepository {
if (parts) {
const [serverName, mediaId] = parts;
const httpUrl = `${this._homeServer}/_matrix/media/r0/thumbnail/${encodeURIComponent(serverName)}/${encodeURIComponent(mediaId)}`;
return httpUrl + "?" + encodeQueryParams({width, height, method});
return httpUrl + "?" + encodeQueryParams({width: Math.round(width), height: Math.round(height), method});
}
return null;
}