mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-14 02:41:17 -06:00
- Updated code for new authedRequest argument format
- matrix-js-sdk updated to 22.0.0 - fs-extra updated to 11.1.0 - minimum version set to 14.14
This commit is contained in:
@@ -52,7 +52,6 @@ module.exports = function(RED) {
|
||||
|
||||
node.server.matrixClient.http
|
||||
.authedRequest(
|
||||
undefined,
|
||||
'PUT',
|
||||
node.encodeUri(
|
||||
"/_synapse/admin/v2/users/$userId",
|
||||
@@ -62,13 +61,13 @@ module.exports = function(RED) {
|
||||
msg.payload,
|
||||
{ prefix: '' }
|
||||
).then(function(e){
|
||||
msg.payload = e;
|
||||
node.send([msg, null]);
|
||||
}).catch(function(e){
|
||||
node.warn("Error creating/editing user " + e);
|
||||
msg.error = e;
|
||||
node.send([null, msg]);
|
||||
});
|
||||
msg.payload = e;
|
||||
node.send([msg, null]);
|
||||
}).catch(function(e){
|
||||
node.warn("Error creating/editing user " + e);
|
||||
msg.error = e;
|
||||
node.send([null, msg]);
|
||||
});
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("matrix-synapse-create-edit-user", MatrixSynapseCreateEditUser);
|
||||
|
||||
@@ -56,7 +56,6 @@ module.exports = function(RED) {
|
||||
);
|
||||
node.server.matrixClient.http
|
||||
.authedRequest(
|
||||
undefined,
|
||||
'POST',
|
||||
path,
|
||||
undefined,
|
||||
|
||||
@@ -60,7 +60,6 @@ module.exports = function(RED) {
|
||||
// we need the status code, so set onlydata to false for this request
|
||||
node.server.matrixClient.http
|
||||
.authedRequest(
|
||||
undefined,
|
||||
'POST',
|
||||
node.encodeUri(
|
||||
"/_synapse/admin/v1/join/$room_id_or_alias",
|
||||
|
||||
@@ -48,7 +48,6 @@ module.exports = function(RED) {
|
||||
|
||||
node.server.matrixClient.http
|
||||
.authedRequest(
|
||||
undefined,
|
||||
'GET',
|
||||
"/_synapse/admin/v2/users",
|
||||
queryParams,
|
||||
|
||||
@@ -53,7 +53,6 @@ module.exports = function(RED) {
|
||||
// we need the status code, so set onlydata to false for this request
|
||||
node.server.matrixClient.http
|
||||
.authedRequest(
|
||||
undefined,
|
||||
'GET',
|
||||
node.encodeUri(
|
||||
"/_matrix/client/r0/admin/whois/$userId",
|
||||
|
||||
Reference in New Issue
Block a user