Skip to content

Commit c4a802e

Browse files
jantmanseratch
andauthored
Expose loop param on asyncio based AsyncSocketModeHandler (#1216)
Co-authored-by: Kazuhiro Sera <[email protected]>
1 parent 15ad6ec commit c4a802e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

slack_bolt/adapter/socket_mode/aiohttp/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from logging import Logger
55
from time import time
66
from typing import Optional
7+
from asyncio import AbstractEventLoop
78

89
from slack_sdk.socket_mode.aiohttp import SocketModeClient
910
from slack_sdk.socket_mode.request import SocketModeRequest
@@ -74,6 +75,7 @@ def __init__(
7475
web_client: Optional[AsyncWebClient] = None,
7576
proxy: Optional[str] = None,
7677
ping_interval: float = 10,
78+
loop: Optional[AbstractEventLoop] = None,
7779
):
7880
self.app = app
7981
self.app_token = app_token or os.environ["SLACK_APP_TOKEN"]
@@ -83,6 +85,7 @@ def __init__(
8385
web_client=web_client if web_client is not None else app.client,
8486
proxy=proxy,
8587
ping_interval=ping_interval,
88+
loop=loop,
8689
)
8790
self.client.socket_mode_request_listeners.append(self.handle) # type: ignore[arg-type]
8891

0 commit comments

Comments
 (0)