diff --git a/src/client.js b/src/client.js index e61264b90..13f8a4c5a 100644 --- a/src/client.js +++ b/src/client.js @@ -4278,9 +4278,13 @@ MatrixClient.prototype.isFallbackICEServerAllowed = function() { * @return {boolean} true if the user appears to be a Synapse administrator. */ MatrixClient.prototype.isSynapseAdministrator = function() { - return this.whoisSynapseUser(this.getUserId()) - .then(() => true) - .catch(() => false); + const path = utils.encodeUri( + "/_synapse/admin/v1/users/$userId/admin", + { $userId: this.getUserId() }, + ); + return this._http.authedRequest( + undefined, 'GET', path, undefined, undefined, {prefix: ''}, + ).then(r => r['admin']); // pull out the specific boolean we want }; /**