2525 AsyncMessageListenerMatches ,
2626)
2727from slack_bolt .oauth .async_internals import select_consistent_installation_store
28- from slack_bolt .util .utils import get_name_for_callable , is_coroutine_function
28+ from slack_bolt .util .utils import get_name_for_callable , is_callable_coroutine
2929from slack_bolt .workflows .step .async_step import (
3030 AsyncWorkflowStep ,
3131 AsyncWorkflowStepBuilder ,
@@ -786,7 +786,7 @@ async def custom_error_handler(error, body, logger):
786786 func: The function that is supposed to be executed
787787 when getting an unhandled error in Bolt app.
788788 """
789- if not is_coroutine_function (func ):
789+ if not is_callable_coroutine (func ):
790790 name = get_name_for_callable (func )
791791 raise BoltError (error_listener_function_must_be_coro_func (name ))
792792 self ._async_listener_runner .listener_error_handler = AsyncCustomListenerErrorHandler (
@@ -1418,7 +1418,7 @@ def _register_listener(
14181418 value_to_return = functions [0 ]
14191419
14201420 for func in functions :
1421- if not is_coroutine_function (func ):
1421+ if not is_callable_coroutine (func ):
14221422 name = get_name_for_callable (func )
14231423 raise BoltError (error_listener_function_must_be_coro_func (name ))
14241424
@@ -1430,7 +1430,7 @@ def _register_listener(
14301430 for m in middleware or []:
14311431 if isinstance (m , AsyncMiddleware ):
14321432 listener_middleware .append (m )
1433- elif callable (m ) and is_coroutine_function (m ):
1433+ elif callable (m ) and is_callable_coroutine (m ):
14341434 listener_middleware .append (AsyncCustomMiddleware (app_name = self .name , func = m , base_logger = self ._base_logger ))
14351435 else :
14361436 raise ValueError (error_unexpected_listener_middleware (type (m )))
0 commit comments