q(...) -> Promise.resolve

```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
This commit is contained in:
Richard van der Hoff 2017-07-12 14:02:00 +01:00
parent a06bd84213
commit 0254d2b3a2
25 changed files with 57 additions and 57 deletions

View file

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