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.
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.
I followed knolleary's hint of adding "use strict"; to the Javascript, it still fails silently.
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