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.
After we turn Hazebot back on after an extended time of being deactivated, the app should know not to message users if their AQI differs from what it was the last time Hazebot was active. Instead, it should start counting at the time at which Hazebot was re-activated. Similarly, when sending share requests we shouldn't just look at when the user last got a share request; we should also check when the app was last activated.
To do this:
Add a config table which contains the app's current status (on/off).
When sending alerts, calculate the timestamp of the last alert as max(last_alert_ts, app_reactivated_at_ts)
When sending share requests, calculate the last share request as max(last_share_request_ts, app_reactivated_at_ts)
We should do this before turning Hazebot back on in June.
After we turn Hazebot back on after an extended time of being deactivated, the app should know not to message users if their AQI differs from what it was the last time Hazebot was active. Instead, it should start counting at the time at which Hazebot was re-activated. Similarly, when sending share requests we shouldn't just look at when the user last got a share request; we should also check when the app was last activated.
To do this:
We should do this before turning Hazebot back on in June.