You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assistant listener middleware crashes when given a plain function #1597
The function is accepted as middleware, the same way @app.event(..., middleware=[my_middleware]) accepts it.
Actual result:
Every matching event fails with AttributeError: 'function' object has no attribute 'process'.
Assistant.build_listener in slack_bolt/middleware/assistant/assistant.py (and AsyncAssistant in async_assistant.py) treats every item in middleware as a Middleware instance. App wraps plain functions in CustomMiddleware, but the assistant does not. It also calls middleware.insert(0, ...) on the list the caller passed in, so the caller's list is changed.
Activity