airq-dev / hazebot

Building the 411 for air quality in the United States: a texting platform accessible to all, that provides actionable local information to protect your and your community.
https://www.hazebot.org/
MIT License
9 stars 1 forks source link

Refactor commands to support arbitrary logic #155

Closed ianhoffman closed 3 years ago

ianhoffman commented 3 years ago

@emjgreen I was thinking of ways to make our command logic less hacky, and I settled on this. If it looks good to you, we can either:

1) merge this down and you pull master and integrate these changes. Your new ReceiveFeedback command would just subclass SMSCommand and override shouldHandle and handle. 2) merge your PR down and then update this PR with those changes. I can handle that.

Happy to go about it either way. Just wanted to get this out there as a cleaner approach.