shaunfish
(Shaun Fisher)
1
Hi
I am a newbe and have a problem when sending data to telegram . I get the error “msg.payload.type is empty”
my function code:
var temp = msg.payload + " °C";
msg.payload.type = “message”;
msg.payload.chatId = “xxxxxxxxxx”;
msg.payload.content = temp;
return msg;
Maybe the " on line 2 and 3
shaunfish
(Shaun Fisher)
3
Nope, the " has to be there
mbonani
(Mauricio Bonani)
4
Try this.
let temp = msg.payload + " °C";
let newMsg = { payload:
{
type: "message",
chatId: "xxxxxxxxxx",
content: temp
}
};
return newMsg;
Yes, but you are using the wrong " in line 2 and 3