node-red-contrib-chatbot icon indicating copy to clipboard operation
node-red-contrib-chatbot copied to clipboard

Listen for bot messages too

Open krystof-k opened this issue 8 years ago • 5 comments

In Slack receiver, messages sent by other bots are not recognized. It should be able to listen for bot_message event.

It'd be great if anyone could add it.

krystof-k avatar Nov 28 '17 11:11 krystof-k

@krystof-k it's fixed in 0.9.1, I initially used this to detect messages coming from the bot itself (preventing a endless circular effect), now I'm using the bot name.

Thanks for the feedback

guidone avatar Nov 28 '17 20:11 guidone

Cool. Thanks!

krystof-k avatar Nov 28 '17 21:11 krystof-k

I had to revert it, skipping the messages with subtype bot_message is the only way to to detect echo messages from the bot itself (removing it will cause endless loop), I reverted until I can find a better way

guidone avatar Nov 29 '17 16:11 guidone

That's a pity :( Thanks for info!

krystof-k avatar Nov 29 '17 16:11 krystof-k

One idea would be to check the bot's ID after connecting to the service (bot.info) then check all incoming messages for subtype = "bot_message" and bot_id != self.id

jheiselman avatar Mar 02 '18 22:03 jheiselman