Skip to content

Better way to turn Hazebot on and off #240

@ianhoffman

Description

@ianhoffman

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions