Make the promises be q promises

This commit is contained in:
Mark Haines 2016-11-08 16:26:25 +00:00
parent 9edfea3b32
commit 72d24f58d0
2 changed files with 11 additions and 12 deletions

View file

@ -53,7 +53,7 @@ function readBlobAsDataUri(file) {
export function decryptFile(file) {
const url = MatrixClientPeg.get().mxcUrlToHttp(file.url);
// Download the encrypted file as an array buffer.
return fetch(url).then(function(response) {
return q(fetch(url)).then(function(response) {
return response.arrayBuffer();
}).then(function(responseData) {
// Decrypt the array buffer using the information taken from