Delete user when app is revoked
Right now if a streaming user (one with 'block new users' enabled) revokes the app, the app will get a message indicating that and will respond by deleting the user from BtUsers. However, if the user is not streaming, we only find out when we make a REST request. We should consistently catch errors from Twitter in REST requests and delete the user when appropriate.
Note this may be solved an alternate way if the app is approved for Site Streams and we are able to stream events for all users.
Update: Now a revoked/suspended/deactivated user will get their deactivatedAt time set in stream.js. The REST version should do the same thing.
Update: now update-users.js will verify credentials every hour and set deactivatedAt as appropriate. The remaining work is:
- detect BtUsers with deactivatedAt > 30 days ago and delete them.
- when deleting BtUsers, also delete UnblockedUsers, Blocks, and BlockBatches for those users. May require adding additional associations in setup.js.
That second bullet point is a duplicate of #31, which also correctly includes the Actions table.