- 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:
2022-12-06 18:47:41 -07:00
parent 3c042ae47d
commit c7f9d56df2
7 changed files with 24 additions and 29 deletions
+7 -8
View File
@@ -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);