-
Notifications
You must be signed in to change notification settings - Fork 19
Route priority: specific handlers should run before global/fallback handlers #351
Copy link
Copy link
Open
Description
Problem
Handlers run in registration order. When a broad handler is registered before a specific one, the broad handler runs first and the specific handler never fires. This affects multiple handler levels:
@app.on_card_action_execute(global) swallows@app.on_card_action_execute("submit_feedback")(specific)@app.on_dialog_open(global) swallows@app.on_dialog_open("my_form")(specific)@app.on_dialog_submit(global) swallows@app.on_dialog_submit("save")(specific)@app.on_invokeswallows all specific invoke handlers (on_dialog_open,on_card_action_execute, etc.)@app.on_eventswallowson_meeting_start,on_read_receipt, etc.@app.on_conversation_updateswallowson_channel_created,on_team_renamed, etc.@app.on_message_updateswallowson_edit_message,on_undelete_message@app.on_message_deleteswallowson_soft_delete_message@app.on_installation_updateswallowson_install_add,on_install_remove@app.on_activityswallows everything
Users shouldn't have to worry about registration order.
Expected behavior
The router should prioritize more specific selectors over broader ones when multiple handlers match the same activity, regardless of registration order.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels