mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-19 05:33:18 -06:00
Pass msg object where possible
As described on https://nodered.org/docs/user-guide/writing-functions#handling-errors
This commit is contained in:
@@ -42,12 +42,12 @@ module.exports = function(RED) {
|
||||
}
|
||||
|
||||
if(!node.server.isConnected()) {
|
||||
node.error("Matrix server connection is currently closed", {});
|
||||
node.error("Matrix server connection is currently closed", msg);
|
||||
node.send([null, msg]);
|
||||
}
|
||||
|
||||
if(!msg.userId) {
|
||||
node.error("msg.userId must be set to edit/create a user (ex: @user:server.com)", {});
|
||||
node.error("msg.userId must be set to edit/create a user (ex: @user:server.com)", msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user