You've already forked matrix-js-sdk
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:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user