Skip to content

Commit

Permalink
Expose loop param on asyncio based AsyncSocketModeHandler (#1216)
Browse files Browse the repository at this point in the history
Co-authored-by: Kazuhiro Sera <[email protected]>
  • Loading branch information
jantman and seratch authored Dec 5, 2024
1 parent 15ad6ec commit c4a802e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slack_bolt/adapter/socket_mode/aiohttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from logging import Logger
from time import time
from typing import Optional
from asyncio import AbstractEventLoop

from slack_sdk.socket_mode.aiohttp import SocketModeClient
from slack_sdk.socket_mode.request import SocketModeRequest
Expand Down Expand Up @@ -74,6 +75,7 @@ def __init__(
web_client: Optional[AsyncWebClient] = None,
proxy: Optional[str] = None,
ping_interval: float = 10,
loop: Optional[AbstractEventLoop] = None,
):
self.app = app
self.app_token = app_token or os.environ["SLACK_APP_TOKEN"]
Expand All @@ -83,6 +85,7 @@ def __init__(
web_client=web_client if web_client is not None else app.client,
proxy=proxy,
ping_interval=ping_interval,
loop=loop,
)
self.client.socket_mode_request_listeners.append(self.handle) # type: ignore[arg-type]

Expand Down

0 comments on commit c4a802e

Please sign in to comment.