cht-gateway
cht-gateway copied to clipboard
Refactor WakefulService and friends to reuse code more
WakefulService is a service that is executed on wake periodically, that deals with polling API to communicate any webapp terminating messages in gateway, as well as taking any webapp originating messages that API returns and sending them on.
We now also do this in the IntentProcessor, attempting to communicate with API and send on any resulting messages whenever we get an incoming SMS.
We should refactor these two classes so they reuse code more, instead of the current copy / paste job that the IntentProcesser is powered by atm.
#147 is probably pretty related, might as well tie these together and get them done in one go