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.
|
* @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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user