1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Add a method to the js sdk to look up 3pids on the ID server.

This commit is contained in:
David Baker
2016-03-18 15:15:10 +00:00
parent fdbc7a3112
commit f4fd8d9ba6
2 changed files with 27 additions and 7 deletions

View File

@@ -245,7 +245,12 @@ module.exports.MatrixHttpApi.prototype = {
opts,
requestCallback(defer, callback, this.opts.onlyData)
);
return defer.promise;
// ID server does not always take JSON, so we can't use requests' 'json'
// option as we do with the home server, but it does return JSON, so
// parse it manually
return defer.promise.then(function(response) {
return JSON.parse(response);
});
},
/**