Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions slack_bolt/context/set_status/async_set_status.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List, Optional

from slack_sdk.web.async_client import AsyncWebClient
from slack_sdk.web.async_slack_response import AsyncSlackResponse

Expand All @@ -17,9 +19,16 @@ def __init__(
self.channel_id = channel_id
self.thread_ts = thread_ts

async def __call__(self, status: str) -> AsyncSlackResponse:
async def __call__(
self,
status: str,
loading_messages: Optional[List[str]] = None,
**kwargs,
) -> AsyncSlackResponse:
return await self.client.assistant_threads_setStatus(
status=status,
channel_id=self.channel_id,
thread_ts=self.thread_ts,
status=status,
loading_messages=loading_messages,
**kwargs,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priaise: The **kwargs is a nice touch to add some future proofing for additional arguments. 🆗

)
13 changes: 11 additions & 2 deletions slack_bolt/context/set_status/set_status.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List, Optional

from slack_sdk import WebClient
from slack_sdk.web import SlackResponse

Expand All @@ -17,9 +19,16 @@ def __init__(
self.channel_id = channel_id
self.thread_ts = thread_ts

def __call__(self, status: str) -> SlackResponse:
def __call__(
self,
status: str,
loading_messages: Optional[List[str]] = None,
**kwargs,
) -> SlackResponse:
return self.client.assistant_threads_setStatus(
status=status,
channel_id=self.channel_id,
thread_ts=self.thread_ts,
status=status,
loading_messages=loading_messages,
**kwargs,
)
Loading