Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete user when app is revoked #30

Open
jsha opened this issue Aug 10, 2014 · 3 comments
Open

Delete user when app is revoked #30

jsha opened this issue Aug 10, 2014 · 3 comments

Comments

@jsha
Copy link
Owner

jsha commented Aug 10, 2014

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.

@jsha
Copy link
Owner Author

jsha commented Sep 13, 2014

Update: Now a revoked/suspended/deactivated user will get their deactivatedAt time set in stream.js. The REST version should do the same thing.

@jsha
Copy link
Owner Author

jsha commented Sep 14, 2014

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.

@jsha
Copy link
Owner Author

jsha commented Sep 14, 2014

That second bullet point is a duplicate of #31, which also correctly includes the Actions table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant