IF YOU KNOW - JUST LIKE THE POST -DONT GIVE OUT THE ANSWER
I was working on real flow late last night and needed to change from outputting on payload to payload.text to feed the mastodon node instead of the twitter node
I spent an hour tearing my hair out as to why it wasn't working and had to resort to an external change node
Can't believe after all the years working with NR that it was only when I wrote this simple flow that my errant thinking struck me.
Although, I am still suprised that it silently "fails" and doesn't give an error - why is that?
FYI here is the JS that the Blocky node generates
If you added the following (exactly as written...) to the top of that code it wouldn't fail silently.
why is that?
Do I get a prize for spotting more than 1 error in that code
That's just what Blocky transcribes it to - can't control that - don't care - hate JS
My initial answer to "What's wrong with this" was the colour clash and horrible shapes of the Blockly code. Not all non-procedural languages can have the clean UI of Node-red though.
I tried to see who did know and "liked" the post; I accidentally liked it myself.
Yet I have not the slightest idea what's wrong with the code apart from it just feels wrong.
Please put me out of my misery and explain what's going on?
It doesn't set msg.payload to an object
So when it tries to set msg.payload.text - it just gets ignored and the original timestamp msg.payload gets sent on instead
This fixes it
Arrghhhhh! You added some pink to all that claret and magenta. It hurts!
Thanks for the explanation.