slack-edge icon indicating copy to clipboard operation
slack-edge copied to clipboard

The `tokens_revoked`, `app_uninstalled`, `app_uninstalled_team` events do not allow a custom handler

Open StephenTangCook opened this issue 5 months ago • 1 comments

The framework registers its built-in handlers in the constructor first, including tokens_revoked, app_uninstalled, app_uninstalled_team events: https://github.com/slack-edge/slack-edge/blob/446dd1ccf739adb97c93964c358ed247dce831de/src/oauth-app.ts#L235-L236

The handlers are pushed on to an array that match based on the event type. https://github.com/slack-edge/slack-edge/blob/446dd1ccf739adb97c93964c358ed247dce831de/src/app.ts#L378

Then when an event comes it, it is serviced only by the first matching handler in the list (if any): https://github.com/slack-edge/slack-edge/blob/446dd1ccf739adb97c93964c358ed247dce831de/src/app.ts#L989-L1002

Thus, any custom event handlers registered for tokens_revoked, app_uninstalled, app_uninstalled_team are never invoked.

StephenTangCook avatar Aug 13 '25 00:08 StephenTangCook

Thanks for reporting this. Good catch; this should be improved.

seratch avatar Aug 13 '25 00:08 seratch