Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new force argument to conversations.invite API method. #1438

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
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
Add new force argument to conversations.invite API method.
Filip Maj committed Nov 30, 2023
commit 4b7e924183a25eca910f9b557aa3b05cd043bdec
8 changes: 7 additions & 1 deletion slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
@@ -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:
8 changes: 7 additions & 1 deletion slack_sdk/web/client.py
Original file line number Diff line number Diff line change
@@ -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:
8 changes: 7 additions & 1 deletion slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
@@ -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: