Skip to content

Commit

Permalink
Add new force argument to conversations.invite API method. (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
filmaj authored Dec 1, 2023
1 parent 9c4d37c commit 19134d1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2865,12 +2865,18 @@ async def conversations_invite(
*,
channel: str,
users: Union[str, Sequence[str]],
force: Optional[bool] = None,
**kwargs,
) -> AsyncSlackResponse:
"""Invites users to a channel.
https://api.slack.com/methods/conversations.invite
"""
kwargs.update({"channel": channel})
kwargs.update(
{
"channel": channel,
"force": force,
}
)
if isinstance(users, (list, Tuple)):
kwargs.update({"users": ",".join(users)})
else:
Expand Down
8 changes: 7 additions & 1 deletion slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2856,12 +2856,18 @@ def conversations_invite(
*,
channel: str,
users: Union[str, Sequence[str]],
force: Optional[bool] = None,
**kwargs,
) -> SlackResponse:
"""Invites users to a channel.
https://api.slack.com/methods/conversations.invite
"""
kwargs.update({"channel": channel})
kwargs.update(
{
"channel": channel,
"force": force,
}
)
if isinstance(users, (list, Tuple)):
kwargs.update({"users": ",".join(users)})
else:
Expand Down
8 changes: 7 additions & 1 deletion slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2867,12 +2867,18 @@ def conversations_invite(
*,
channel: str,
users: Union[str, Sequence[str]],
force: Optional[bool] = None,
**kwargs,
) -> Union[Future, SlackResponse]:
"""Invites users to a channel.
https://api.slack.com/methods/conversations.invite
"""
kwargs.update({"channel": channel})
kwargs.update(
{
"channel": channel,
"force": force,
}
)
if isinstance(users, (list, Tuple)):
kwargs.update({"users": ",".join(users)})
else:
Expand Down

0 comments on commit 19134d1

Please sign in to comment.