Skip to content

Commit 25633a4

Browse files
committed
feat: accept assistant.threads.setStatus method arguments from the assistant class
1 parent 7cedaac commit 25633a4

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

slack_bolt/context/set_status/async_set_status.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List, Optional
2+
13
from slack_sdk.web.async_client import AsyncWebClient
24
from slack_sdk.web.async_slack_response import AsyncSlackResponse
35

@@ -17,9 +19,16 @@ def __init__(
1719
self.channel_id = channel_id
1820
self.thread_ts = thread_ts
1921

20-
async def __call__(self, status: str) -> AsyncSlackResponse:
22+
async def __call__(
23+
self,
24+
status: str,
25+
loading_messages: Optional[List[str]] = None,
26+
**kwargs,
27+
) -> AsyncSlackResponse:
2128
return await self.client.assistant_threads_setStatus(
22-
status=status,
2329
channel_id=self.channel_id,
2430
thread_ts=self.thread_ts,
31+
status=status,
32+
loading_messages=loading_messages,
33+
**kwargs,
2534
)

slack_bolt/context/set_status/set_status.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List, Optional
2+
13
from slack_sdk import WebClient
24
from slack_sdk.web import SlackResponse
35

@@ -17,9 +19,16 @@ def __init__(
1719
self.channel_id = channel_id
1820
self.thread_ts = thread_ts
1921

20-
def __call__(self, status: str) -> SlackResponse:
22+
def __call__(
23+
self,
24+
status: str,
25+
loading_messages: Optional[List[str]] = None,
26+
**kwargs,
27+
) -> SlackResponse:
2128
return self.client.assistant_threads_setStatus(
22-
status=status,
2329
channel_id=self.channel_id,
2430
thread_ts=self.thread_ts,
31+
status=status,
32+
loading_messages=loading_messages,
33+
**kwargs,
2534
)

0 commit comments

Comments
 (0)