mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-19 05:33:18 -06:00
(de)Register consumer nodes at config node
In order for error messages to be catchable
This commit is contained in:
@@ -12,6 +12,7 @@ module.exports = function(RED) {
|
||||
node.error('Server must be configured on the node.', {});
|
||||
return;
|
||||
}
|
||||
node.server.register(node);
|
||||
|
||||
this.encodeUri = function(pathTemplate, variables) {
|
||||
for (const key in variables) {
|
||||
@@ -64,6 +65,10 @@ module.exports = function(RED) {
|
||||
node.send([null, msg]);
|
||||
});
|
||||
});
|
||||
|
||||
node.on("close", function() {
|
||||
node.server.deregister(node);
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("matrix-invite-room", MatrixInviteRoom);
|
||||
}
|
||||
Reference in New Issue
Block a user