hedwig-im / hedwig

An Adapter-based Bot Framework for Elixir Applications
MIT License
650 stars 73 forks source link

What is the recommended alternative to `ignore_from_self?` #57

Closed stevegrossi closed 7 years ago

stevegrossi commented 7 years ago

I see there was an ignore_from_self? option in 0.1 that appears to have been removed. Is there another recommended way to prevent Hedwig bots from getting stuck in loops responding to themselves?

Here is how I implemented this myself, but I wonder if Hedwig still provides a way.

scrogson commented 7 years ago

Hi @stevegrossi, that functionality should be handled in the adapter you're using. In the case that it is not, you can handle it in the handle_in/2 function in your robot module.

I've made some recent changes on master that allow the user to have full control over whether a message should be dispatched to the responders or not. But I'm not sure if the Flowdock adapter author has updated it to work with those changes.

stevegrossi commented 7 years ago

Thanks for the direction! I don't think the Flowdock adapter has been updated for this, so I'll look to contribute there.

And thanks so much for your work on Hedwig. It's been a blast to learn and use, and our chatbot has been a great way to get folks from my local Elixir meetup involved in writing Elixir code 👍