From d021498fa9c0ad73baecc9f12721c62639558cdd Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 1 Jun 2020 11:29:06 +0100 Subject: [PATCH] Drop presence lists --- src/client.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/client.js b/src/client.js index 2bf7bbdc17c..663019443ef 100644 --- a/src/client.js +++ b/src/client.js @@ -3511,46 +3511,6 @@ MatrixClient.prototype.setPresence = function(opts, callback) { ); }; -function _presenceList(callback, client, opts, method) { - const path = utils.encodeUri("/presence/list/$userId", { - $userId: client.credentials.userId, - }); - return client._http.authedRequest(callback, method, path, undefined, opts); -} - -/** -* Retrieve current user presence list. -* @param {module:client.callback} callback Optional. -* @return {Promise} Resolves: TODO -* @return {module:http-api.MatrixError} Rejects: with an error response. -*/ -MatrixClient.prototype.getPresenceList = function(callback) { - return _presenceList(callback, this, undefined, "GET"); -}; - -/** -* Add users to the current user presence list. -* @param {module:client.callback} callback Optional. -* @param {string[]} userIds -* @return {Promise} Resolves: TODO -* @return {module:http-api.MatrixError} Rejects: with an error response. -*/ -MatrixClient.prototype.inviteToPresenceList = function(callback, userIds) { - const opts = {"invite": userIds}; - return _presenceList(callback, this, opts, "POST"); -}; - -/** -* Drop users from the current user presence list. -* @param {module:client.callback} callback Optional. -* @param {string[]} userIds -* @return {Promise} Resolves: TODO -* @return {module:http-api.MatrixError} Rejects: with an error response. -**/ -MatrixClient.prototype.dropFromPresenceList = function(callback, userIds) { - const opts = {"drop": userIds}; - return _presenceList(callback, this, opts, "POST"); -}; /** * Retrieve older messages from the given room and put them in the timeline.