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_invoke swallows all specific invoke handlers (on_dialog_open, on_card_action_execute, etc.)
@app.on_event swallows on_meeting_start, on_read_receipt, etc.
@app.on_conversation_update swallows on_channel_created, on_team_renamed, etc.
@app.on_message_update swallows on_edit_message, on_undelete_message
@app.on_message_delete swallows on_soft_delete_message
@app.on_installation_update swallows on_install_add, on_install_remove
@app.on_activity swallows 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.
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 everythingUsers 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.