- can now specify message in node's configuration for matrix-send-message
- can now specify reaction in node's configuration for matrix-react
- reason can now be configured on both matrix-room-kick and matrix-room-ban
- icons updated for various nodes
This commit is contained in:
2022-03-17 16:01:27 -06:00
parent 380e548425
commit 3dc6363a88
23 changed files with 82 additions and 55 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ module.exports = function(RED) {
this.name = n.name;
this.server = RED.nodes.getNode(n.server);
this.roomId = n.roomId;
this.reason = n.reason;
if (!node.server) {
node.warn("No configuration node");
@@ -45,7 +46,7 @@ module.exports = function(RED) {
return;
}
node.server.matrixClient.kick(msg.topic, msg.userId, msg.reason || undefined)
node.server.matrixClient.kick(msg.topic, msg.userId, n.reason || msg.reason || undefined)
.then(function(e) {
node.log("Successfully kicked " + msg.userId + " from " + msg.topic);
msg.eventId = e.event_id;