From 0ceb8d159a352a47a5817e22d65403349dfbef81 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 14 Sep 2017 15:28:21 -0600 Subject: [PATCH] Generate the ignored users event content correctly Signed-off-by: Travis Ralston --- src/client.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/client.js b/src/client.js index 67c89ad71..f9574cb74 100644 --- a/src/client.js +++ b/src/client.js @@ -775,13 +775,8 @@ MatrixClient.prototype.getIgnoredUsers = function() { * @return {module:http-api.MatrixError} Rejects: with an error response. */ MatrixClient.prototype.setIgnoredUsers = function(userIds, callback) { - var content = { - ignored_users: userIds.map(u => { - var obj = {}; - obj[u] = {}; - return obj; - }) - }; + var content = {ignored_users: {}}; + userIds.map(u => content.ignored_users[u] = {}); return this.setAccountData("m.ignored_user_list", content, callback); };