admins can undo recycle
Value
- we might accidentally remove a channel that people still want to use, that's jarring!
- would be nice to let people know a channel is going to get deleted and give them a way to undo that!
Behavior
WHEN a maintainer issues a recycle
command for a channel
- THEN the admins will receive a notification that says
Your channel is about to be deactivated due to lack of use. To continue using the channel, respond with any message in the next 24 hours.
- IF admins respond within 24 hours, THEN their channel will not be recycled
- IF admins do not respond withing 24 hours, THEN their channel will be recycled (and they will receive notification that says
Your channel is being deactivated due to lack of use. To create a new channel, visit https://signalboost.info
Implementation details
-
recycle
command puts a channel into a (new)recycleQueue
table- fields:
channelPhoneNumber
(string),whenEnqueued
(datetime)
- fields:
- every hour a job runs that checks the recycle queue
checkForRecyclableNumbers
(or something) - it removes from the recycle queue any channels that meet the following criteria:
- (1) the channels
messageCounts
entry was last updated less than 24 hours ago
- (1) the channels
- it recycles any channels that meet the following 2 criteria (and then deletes them from the queue):
- (1) the the channel's
recycleQueue
entry was created more than 24 hours ago - (2) the channel's
messageCounts
entry was last updated more than 24 hours ago
- (1) the the channel's
additional TODO:
- destroy should also destroy entry in recycleablePhoneNumbers
- refactor registrar#notify to use correct lang prefs/notification
Open Questions
- what about destroy commands? options:
- (1) impose a delay on destroy commands issued by maintainers (via cli) but not by admins (via signalboost command)?
- (2) don't impose any delay on destroy commands and also don't expose it via the cli? if maintainers want to destroy a channel they have to first recycle it, then wait a day, then destroy it?
Edited by aguestuser