-
Notifications
You must be signed in to change notification settings - Fork 274
Description
As of today, developers have to implement their own logic to clean up database like this: https://github.com/seratch/send-it-later-for-slack/blob/e5f3555f347826576099f2f8551b03089ba7479d/app/listeners.py#L209-L226
I came to think that Bolt should provide better abstraction of installation store operations for it. If other maintainers are fine with this approach, I'm happy to add the same functionalities to other Bolt frameworks.
This pull request adds built-in event handlers for token revocations and app uninstallation. The handy way to turn the additional features on is to use enableTokenRevocationHandlers() method as below:
app = App(
token_revocation_handlers_enabled=True
) # installation_store requiredThis is equivalent to the following code:
app = App() # installation_store required
app.event("tokens_revoked")(app.default_tokens_revoked_event_listener)
app.event("app_uninstalled")(app.default_app_uninstalled_event_listener)See also:
- Add built-in tokens_revoked/app_uninstalled event handlers java-slack-sdk#703
- Add deletion methods to InstallationStore python-slack-sdk#976
Category (place an x in each of the [ ])
- slack_bolt.App and/or its core components
- slack_bolt.async_app.AsyncApp and/or its core components
- Adapters in slack_bolt.adapter
- Others
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.