|
|
|
@ -166,6 +166,17 @@ angular.module('matrixService', []) |
|
|
|
|
return doRequest("POST", path, undefined, data); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Bans a user from from a room
|
|
|
|
|
ban: function(room_id, user_id, reason) { |
|
|
|
|
var path = "/rooms/$room_id/ban/"; |
|
|
|
|
path = path.replace("$room_id", encodeURIComponent(room_id)); |
|
|
|
|
|
|
|
|
|
return doRequest("PUT", path, undefined, { |
|
|
|
|
user_id: user_id, |
|
|
|
|
reason: reason |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Retrieves the room ID corresponding to a room alias
|
|
|
|
|
resolveRoomAlias:function(room_alias) { |
|
|
|
|
var path = "/_matrix/client/api/v1/directory/room/$room_alias"; |
|
|
|
@ -409,6 +420,7 @@ angular.module('matrixService', []) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****** Permanent storage of user information ******/ |
|
|
|
|
|
|
|
|
|
// Returns the current config
|
|
|
|
|