Skip to content

Commit 19134d1

Browse files
authored
Add new force argument to conversations.invite API method. (#1438)
1 parent 9c4d37c commit 19134d1

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

slack_sdk/web/async_client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2865,12 +2865,18 @@ async def conversations_invite(
28652865
*,
28662866
channel: str,
28672867
users: Union[str, Sequence[str]],
2868+
force: Optional[bool] = None,
28682869
**kwargs,
28692870
) -> AsyncSlackResponse:
28702871
"""Invites users to a channel.
28712872
https://api.slack.com/methods/conversations.invite
28722873
"""
2873-
kwargs.update({"channel": channel})
2874+
kwargs.update(
2875+
{
2876+
"channel": channel,
2877+
"force": force,
2878+
}
2879+
)
28742880
if isinstance(users, (list, Tuple)):
28752881
kwargs.update({"users": ",".join(users)})
28762882
else:

slack_sdk/web/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2856,12 +2856,18 @@ def conversations_invite(
28562856
*,
28572857
channel: str,
28582858
users: Union[str, Sequence[str]],
2859+
force: Optional[bool] = None,
28592860
**kwargs,
28602861
) -> SlackResponse:
28612862
"""Invites users to a channel.
28622863
https://api.slack.com/methods/conversations.invite
28632864
"""
2864-
kwargs.update({"channel": channel})
2865+
kwargs.update(
2866+
{
2867+
"channel": channel,
2868+
"force": force,
2869+
}
2870+
)
28652871
if isinstance(users, (list, Tuple)):
28662872
kwargs.update({"users": ",".join(users)})
28672873
else:

slack_sdk/web/legacy_client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,12 +2867,18 @@ def conversations_invite(
28672867
*,
28682868
channel: str,
28692869
users: Union[str, Sequence[str]],
2870+
force: Optional[bool] = None,
28702871
**kwargs,
28712872
) -> Union[Future, SlackResponse]:
28722873
"""Invites users to a channel.
28732874
https://api.slack.com/methods/conversations.invite
28742875
"""
2875-
kwargs.update({"channel": channel})
2876+
kwargs.update(
2877+
{
2878+
"channel": channel,
2879+
"force": force,
2880+
}
2881+
)
28762882
if isinstance(users, (list, Tuple)):
28772883
kwargs.update({"users": ",".join(users)})
28782884
else:

0 commit comments

Comments
 (0)