mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 16:54:56 -04:00
Added /ban command
This commit is contained in:
parent
65c7f78e9f
commit
56427b8057
2 changed files with 29 additions and 1 deletions
|
@ -165,6 +165,17 @@ angular.module('matrixService', [])
|
|||
// TODO: Use PUT with transaction IDs
|
||||
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) {
|
||||
|
@ -408,7 +419,8 @@ angular.module('matrixService', [])
|
|||
state: presence
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
/****** Permanent storage of user information ******/
|
||||
|
||||
// Returns the current config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue