1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Generate the ignored users event content correctly

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston
2017-09-14 15:28:21 -06:00
parent be55451c90
commit 0ceb8d159a

View File

@@ -775,13 +775,8 @@ MatrixClient.prototype.getIgnoredUsers = function() {
* @return {module:http-api.MatrixError} Rejects: with an error response. * @return {module:http-api.MatrixError} Rejects: with an error response.
*/ */
MatrixClient.prototype.setIgnoredUsers = function(userIds, callback) { MatrixClient.prototype.setIgnoredUsers = function(userIds, callback) {
var content = { var content = {ignored_users: {}};
ignored_users: userIds.map(u => { userIds.map(u => content.ignored_users[u] = {});
var obj = {};
obj[u] = {};
return obj;
})
};
return this.setAccountData("m.ignored_user_list", content, callback); return this.setAccountData("m.ignored_user_list", content, callback);
}; };