steffenmllr / node-red-contrib-speedtest

Test speed input node
MIT License
4 stars 10 forks source link

Prevent module from stepping on the rest of the msg object when reporting results #3

Closed arychj closed 2 years ago

arychj commented 6 years ago

this.send({ payload: reponse }); destroys any data currently residing in the msg object and creates a new object with just the payload.

For example, when workflow is initiated from slack information is stored on the msg object which is necessary to reply to the proper channel. This data should be preserved, with only the payload being set.

ramosisw commented 5 years ago

I need this solution!

CyaOnDaNet commented 5 years ago

Bruh, thanks so much, just implemented your changes and now the msg object isn't getting destroyed.

sparten9999 commented 4 years ago

@arychj did you delete your repository? i was hoping i can try to use it to fix my nodered. or did you find another solution

arychj commented 4 years ago

@sparten9999 Honestly, I'm not sure what happened. I don't recall deleting it, but I may have...

In any event, just replace the speedtest.js file in the module directory with this version and you should be good to go!

sparten9999 commented 4 years ago

appreciate it. thank you. hopefully this gets updated though

steffenmllr commented 2 years ago

Thanks for your PR and sorry for not replying (I'm not using node-red anymore). I've published a new version with the latest speedtest including your changes