From ab20a342b7a3be2bf2cbd4531a75214ddc44a2b4 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Tue, 25 Jun 2024 12:56:30 -0400 Subject: [PATCH 1/6] feat: add new conversations.externalInvitePermissions.set API --- .../web/test_conversations_connect.py | 34 +++++++++++++++++++ slack_sdk/web/async_client.py | 15 ++++++++ slack_sdk/web/client.py | 15 ++++++++ slack_sdk/web/legacy_client.py | 15 ++++++++ .../web/test_web_client_coverage.py | 7 ++-- 5 files changed, 84 insertions(+), 2 deletions(-) diff --git a/integration_tests/web/test_conversations_connect.py b/integration_tests/web/test_conversations_connect.py index 798f8ed11..a317da33b 100644 --- a/integration_tests/web/test_conversations_connect.py +++ b/integration_tests/web/test_conversations_connect.py @@ -45,6 +45,10 @@ def test_sync(self): channel_id: Optional[str] = None try: + auth_test: SlackResponse = receiver.auth_test() + self.assertIsNotNone(auth_test["team_id"]) + connect_team_id = auth_test["team_id"] + # list senders pending connect invites connect_invites: SlackResponse = sender.conversations_listConnectInvites() self.assertIsNotNone(connect_invites["invites"]) @@ -76,6 +80,19 @@ def test_sync(self): receiver.conversations_approveSharedInvite, invite_id=invite["invite_id"], ) + + sender_approval = sender.conversations_acceptSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) + self.assertIsNone(sender_approval["error"]) + + downgrade = sender.conversations_externalInvitePermissions_set( + channel=channel_id, target_team=connect_team_id, action="downgrade" + ) + self.assertIsNone(downgrade["error"]) + + upgrade = sender.conversations_externalInvitePermissions_set( + channel=channel_id, target_team=connect_team_id, action="upgrade" + ) + self.assertIsNone(upgrade["error"]) finally: if channel_id is not None: # clean up created channel @@ -89,6 +106,10 @@ async def test_async(self): channel_id: Optional[str] = None try: + auth_test: SlackResponse = await receiver.auth_test() + self.assertIsNotNone(auth_test["team_id"]) + connect_team_id = auth_test["team_id"] + # list senders pending connect invites connect_invites: SlackResponse = await sender.conversations_listConnectInvites() self.assertIsNotNone(connect_invites["invites"]) @@ -117,6 +138,19 @@ async def test_async(self): # receiver attempt to approve invite already accepted by an admin level token should fail with self.assertRaises(SlackApiError): await receiver.conversations_approveSharedInvite(invite_id=invite["invite_id"]) + + sender_approval = await sender.conversations_acceptSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) + self.assertIsNone(sender_approval["error"]) + + downgrade = await sender.conversations_externalInvitePermissions_set( + channel=channel_id, target_team=connect_team_id, action="downgrade" + ) + self.assertIsNone(downgrade["error"]) + + upgrade = await sender.conversations_externalInvitePermissions_set( + channel=channel_id, target_team=connect_team_id, action="upgrade" + ) + self.assertIsNone(upgrade["error"]) finally: if channel_id is not None: # clean up created channel diff --git a/slack_sdk/web/async_client.py b/slack_sdk/web/async_client.py index 92e5467b0..056864767 100644 --- a/slack_sdk/web/async_client.py +++ b/slack_sdk/web/async_client.py @@ -2912,6 +2912,21 @@ async def conversations_declineSharedInvite( kwargs.update({"invite_id": invite_id, "target_team": target_team}) return await self.api_call("conversations.declineSharedInvite", http_verb="GET", params=kwargs) + async def conversations_externalInvitePermissions_set( + self, *, action: str, channel: str, target_team: str, **kwargs + ) -> AsyncSlackResponse: + """Sets a team in a shared External Limited channel to a shared Slack Connect channel or vice versa. + https://api.slack.com/methods/conversations.externalInvitePermissions.set + """ + kwargs.update( + { + "action": action, + "channel": channel, + "target_team": target_team, + } + ) + return await self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + async def conversations_history( self, *, diff --git a/slack_sdk/web/client.py b/slack_sdk/web/client.py index f07c922ff..79c82fd6e 100644 --- a/slack_sdk/web/client.py +++ b/slack_sdk/web/client.py @@ -2903,6 +2903,21 @@ def conversations_declineSharedInvite( kwargs.update({"invite_id": invite_id, "target_team": target_team}) return self.api_call("conversations.declineSharedInvite", http_verb="GET", params=kwargs) + def conversations_externalInvitePermissions_set( + self, *, action: str, channel: str, target_team: str, **kwargs + ) -> SlackResponse: + """Sets a team in a shared External Limited channel to a shared Slack Connect channel or vice versa. + https://api.slack.com/methods/conversations.externalInvitePermissions.set + """ + kwargs.update( + { + "action": action, + "channel": channel, + "target_team": target_team, + } + ) + return self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + def conversations_history( self, *, diff --git a/slack_sdk/web/legacy_client.py b/slack_sdk/web/legacy_client.py index 299f01b82..a4623a4d4 100644 --- a/slack_sdk/web/legacy_client.py +++ b/slack_sdk/web/legacy_client.py @@ -2914,6 +2914,21 @@ def conversations_declineSharedInvite( kwargs.update({"invite_id": invite_id, "target_team": target_team}) return self.api_call("conversations.declineSharedInvite", http_verb="GET", params=kwargs) + def conversations_externalInvitePermissions_set( + self, *, action: str, channel: str, target_team: str, **kwargs + ) -> Union[Future, SlackResponse]: + """Sets a team in a shared External Limited channel to a shared Slack Connect channel or vice versa. + https://api.slack.com/methods/conversations.externalInvitePermissions.set + """ + kwargs.update( + { + "action": action, + "channel": channel, + "target_team": target_team, + } + ) + return self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + def conversations_history( self, *, diff --git a/tests/slack_sdk_async/web/test_web_client_coverage.py b/tests/slack_sdk_async/web/test_web_client_coverage.py index 9d66e9de8..b256288ad 100644 --- a/tests/slack_sdk_async/web/test_web_client_coverage.py +++ b/tests/slack_sdk_async/web/test_web_client_coverage.py @@ -15,9 +15,9 @@ class TestWebClientCoverage(unittest.TestCase): - # 284 endpoints as of June 19, 2024 + # 285 endpoints as of June 25, 2024 # Can be fetched by running `var methodNames = [].slice.call(document.getElementsByClassName('apiReferenceFilterableList__listItemLink')).map(e => e.href.replace("https://api.slack.com/methods/", ""));console.log(methodNames.toString());console.log(methodNames.length);` on https://api.slack.com/methods - all_api_methods = "admin.analytics.getFile,admin.apps.activities.list,admin.apps.approve,admin.apps.clearResolution,admin.apps.restrict,admin.apps.uninstall,admin.apps.approved.list,admin.apps.config.lookup,admin.apps.config.set,admin.apps.requests.cancel,admin.apps.requests.list,admin.apps.restricted.list,admin.audit.anomaly.allow.getItem,admin.audit.anomaly.allow.updateItem,admin.auth.policy.assignEntities,admin.auth.policy.getEntities,admin.auth.policy.removeEntities,admin.barriers.create,admin.barriers.delete,admin.barriers.list,admin.barriers.update,admin.conversations.archive,admin.conversations.bulkArchive,admin.conversations.bulkDelete,admin.conversations.bulkMove,admin.conversations.convertToPrivate,admin.conversations.convertToPublic,admin.conversations.create,admin.conversations.delete,admin.conversations.disconnectShared,admin.conversations.getConversationPrefs,admin.conversations.getCustomRetention,admin.conversations.getTeams,admin.conversations.invite,admin.conversations.lookup,admin.conversations.removeCustomRetention,admin.conversations.rename,admin.conversations.search,admin.conversations.setConversationPrefs,admin.conversations.setCustomRetention,admin.conversations.setTeams,admin.conversations.unarchive,admin.conversations.ekm.listOriginalConnectedChannelInfo,admin.conversations.restrictAccess.addGroup,admin.conversations.restrictAccess.listGroups,admin.conversations.restrictAccess.removeGroup,admin.emoji.add,admin.emoji.addAlias,admin.emoji.list,admin.emoji.remove,admin.emoji.rename,admin.functions.list,admin.functions.permissions.lookup,admin.functions.permissions.set,admin.inviteRequests.approve,admin.inviteRequests.deny,admin.inviteRequests.list,admin.inviteRequests.approved.list,admin.inviteRequests.denied.list,admin.roles.addAssignments,admin.roles.listAssignments,admin.roles.removeAssignments,admin.teams.admins.list,admin.teams.create,admin.teams.list,admin.teams.owners.list,admin.teams.settings.info,admin.teams.settings.setDefaultChannels,admin.teams.settings.setDescription,admin.teams.settings.setDiscoverability,admin.teams.settings.setIcon,admin.teams.settings.setName,admin.usergroups.addChannels,admin.usergroups.addTeams,admin.usergroups.listChannels,admin.usergroups.removeChannels,admin.users.assign,admin.users.invite,admin.users.list,admin.users.remove,admin.users.setAdmin,admin.users.setExpiration,admin.users.setOwner,admin.users.setRegular,admin.users.session.clearSettings,admin.users.session.getSettings,admin.users.session.invalidate,admin.users.session.list,admin.users.session.reset,admin.users.session.resetBulk,admin.users.session.setSettings,admin.users.unsupportedVersions.export,admin.workflows.collaborators.add,admin.workflows.collaborators.remove,admin.workflows.permissions.lookup,admin.workflows.search,admin.workflows.unpublish,admin.workflows.triggers.types.permissions.lookup,admin.workflows.triggers.types.permissions.set,api.test,apps.activities.list,apps.auth.external.delete,apps.auth.external.get,apps.connections.open,apps.uninstall,apps.datastore.bulkDelete,apps.datastore.bulkGet,apps.datastore.bulkPut,apps.datastore.count,apps.datastore.delete,apps.datastore.get,apps.datastore.put,apps.datastore.query,apps.datastore.update,apps.event.authorizations.list,apps.manifest.create,apps.manifest.delete,apps.manifest.export,apps.manifest.update,apps.manifest.validate,auth.revoke,auth.test,auth.teams.list,bookmarks.add,bookmarks.edit,bookmarks.list,bookmarks.remove,bots.info,calls.add,calls.end,calls.info,calls.update,calls.participants.add,calls.participants.remove,canvases.access.delete,canvases.access.set,canvases.create,canvases.delete,canvases.edit,canvases.sections.lookup,chat.delete,chat.deleteScheduledMessage,chat.getPermalink,chat.meMessage,chat.postEphemeral,chat.postMessage,chat.scheduleMessage,chat.unfurl,chat.update,chat.scheduledMessages.list,conversations.acceptSharedInvite,conversations.approveSharedInvite,conversations.archive,conversations.close,conversations.create,conversations.declineSharedInvite,conversations.history,conversations.info,conversations.invite,conversations.inviteShared,conversations.join,conversations.kick,conversations.leave,conversations.list,conversations.listConnectInvites,conversations.mark,conversations.members,conversations.open,conversations.rename,conversations.replies,conversations.setPurpose,conversations.setTopic,conversations.unarchive,conversations.canvases.create,dialog.open,dnd.endDnd,dnd.endSnooze,dnd.info,dnd.setSnooze,dnd.teamInfo,emoji.list,files.completeUploadExternal,files.delete,files.getUploadURLExternal,files.info,files.list,files.revokePublicURL,files.sharedPublicURL,files.upload,files.comments.delete,files.remote.add,files.remote.info,files.remote.list,files.remote.remove,files.remote.share,files.remote.update,functions.completeError,functions.completeSuccess,functions.distributions.permissions.add,functions.distributions.permissions.list,functions.distributions.permissions.remove,functions.distributions.permissions.set,functions.workflows.steps.list,functions.workflows.steps.responses.export,migration.exchange,oauth.access,oauth.v2.access,oauth.v2.exchange,openid.connect.token,openid.connect.userInfo,pins.add,pins.list,pins.remove,reactions.add,reactions.get,reactions.list,reactions.remove,reminders.add,reminders.complete,reminders.delete,reminders.info,reminders.list,rtm.connect,rtm.start,search.all,search.files,search.messages,stars.add,stars.list,stars.remove,team.accessLogs,team.billableInfo,team.info,team.integrationLogs,team.billing.info,team.externalTeams.list,team.preferences.list,team.profile.get,tooling.tokens.rotate,usergroups.create,usergroups.disable,usergroups.enable,usergroups.list,usergroups.update,usergroups.users.list,usergroups.users.update,users.conversations,users.deletePhoto,users.getPresence,users.identity,users.info,users.list,users.lookupByEmail,users.setActive,users.setPhoto,users.setPresence,users.profile.get,users.profile.set,views.open,views.publish,views.push,views.update,workflows.stepCompleted,workflows.stepFailed,workflows.updateStep,workflows.triggers.permissions.add,workflows.triggers.permissions.list,workflows.triggers.permissions.remove,workflows.triggers.permissions.set,channels.create,channels.info,channels.invite,channels.mark,groups.create,groups.info,groups.invite,groups.mark,groups.open,im.list,im.mark,im.open,mpim.list,mpim.mark,mpim.open".split( + all_api_methods = "admin.analytics.getFile,admin.apps.activities.list,admin.apps.approve,admin.apps.clearResolution,admin.apps.restrict,admin.apps.uninstall,admin.apps.approved.list,admin.apps.config.lookup,admin.apps.config.set,admin.apps.requests.cancel,admin.apps.requests.list,admin.apps.restricted.list,admin.audit.anomaly.allow.getItem,admin.audit.anomaly.allow.updateItem,admin.auth.policy.assignEntities,admin.auth.policy.getEntities,admin.auth.policy.removeEntities,admin.barriers.create,admin.barriers.delete,admin.barriers.list,admin.barriers.update,admin.conversations.archive,admin.conversations.bulkArchive,admin.conversations.bulkDelete,admin.conversations.bulkMove,admin.conversations.convertToPrivate,admin.conversations.convertToPublic,admin.conversations.create,admin.conversations.delete,admin.conversations.disconnectShared,admin.conversations.getConversationPrefs,admin.conversations.getCustomRetention,admin.conversations.getTeams,admin.conversations.invite,admin.conversations.lookup,admin.conversations.removeCustomRetention,admin.conversations.rename,admin.conversations.search,admin.conversations.setConversationPrefs,admin.conversations.setCustomRetention,admin.conversations.setTeams,admin.conversations.unarchive,admin.conversations.ekm.listOriginalConnectedChannelInfo,admin.conversations.restrictAccess.addGroup,admin.conversations.restrictAccess.listGroups,admin.conversations.restrictAccess.removeGroup,admin.emoji.add,admin.emoji.addAlias,admin.emoji.list,admin.emoji.remove,admin.emoji.rename,admin.functions.list,admin.functions.permissions.lookup,admin.functions.permissions.set,admin.inviteRequests.approve,admin.inviteRequests.deny,admin.inviteRequests.list,admin.inviteRequests.approved.list,admin.inviteRequests.denied.list,admin.roles.addAssignments,admin.roles.listAssignments,admin.roles.removeAssignments,admin.teams.admins.list,admin.teams.create,admin.teams.list,admin.teams.owners.list,admin.teams.settings.info,admin.teams.settings.setDefaultChannels,admin.teams.settings.setDescription,admin.teams.settings.setDiscoverability,admin.teams.settings.setIcon,admin.teams.settings.setName,admin.usergroups.addChannels,admin.usergroups.addTeams,admin.usergroups.listChannels,admin.usergroups.removeChannels,admin.users.assign,admin.users.invite,admin.users.list,admin.users.remove,admin.users.setAdmin,admin.users.setExpiration,admin.users.setOwner,admin.users.setRegular,admin.users.session.clearSettings,admin.users.session.getSettings,admin.users.session.invalidate,admin.users.session.list,admin.users.session.reset,admin.users.session.resetBulk,admin.users.session.setSettings,admin.users.unsupportedVersions.export,admin.workflows.collaborators.add,admin.workflows.collaborators.remove,admin.workflows.permissions.lookup,admin.workflows.search,admin.workflows.unpublish,admin.workflows.triggers.types.permissions.lookup,admin.workflows.triggers.types.permissions.set,api.test,apps.activities.list,apps.auth.external.delete,apps.auth.external.get,apps.connections.open,apps.uninstall,apps.datastore.bulkDelete,apps.datastore.bulkGet,apps.datastore.bulkPut,apps.datastore.count,apps.datastore.delete,apps.datastore.get,apps.datastore.put,apps.datastore.query,apps.datastore.update,apps.event.authorizations.list,apps.manifest.create,apps.manifest.delete,apps.manifest.export,apps.manifest.update,apps.manifest.validate,auth.revoke,auth.test,auth.teams.list,bookmarks.add,bookmarks.edit,bookmarks.list,bookmarks.remove,bots.info,calls.add,calls.end,calls.info,calls.update,calls.participants.add,calls.participants.remove,canvases.access.delete,canvases.access.set,canvases.create,canvases.delete,canvases.edit,canvases.sections.lookup,chat.delete,chat.deleteScheduledMessage,chat.getPermalink,chat.meMessage,chat.postEphemeral,chat.postMessage,chat.scheduleMessage,chat.unfurl,chat.update,chat.scheduledMessages.list,conversations.acceptSharedInvite,conversations.approveSharedInvite,conversations.archive,conversations.close,conversations.create,conversations.declineSharedInvite,conversations.history,conversations.info,conversations.invite,conversations.inviteShared,conversations.join,conversations.kick,conversations.leave,conversations.list,conversations.listConnectInvites,conversations.mark,conversations.members,conversations.open,conversations.rename,conversations.replies,conversations.setPurpose,conversations.setTopic,conversations.unarchive,conversations.canvases.create,conversations.externalInvitePermissions.set,dialog.open,dnd.endDnd,dnd.endSnooze,dnd.info,dnd.setSnooze,dnd.teamInfo,emoji.list,files.completeUploadExternal,files.delete,files.getUploadURLExternal,files.info,files.list,files.revokePublicURL,files.sharedPublicURL,files.upload,files.comments.delete,files.remote.add,files.remote.info,files.remote.list,files.remote.remove,files.remote.share,files.remote.update,functions.completeError,functions.completeSuccess,functions.distributions.permissions.add,functions.distributions.permissions.list,functions.distributions.permissions.remove,functions.distributions.permissions.set,functions.workflows.steps.list,functions.workflows.steps.responses.export,migration.exchange,oauth.access,oauth.v2.access,oauth.v2.exchange,openid.connect.token,openid.connect.userInfo,pins.add,pins.list,pins.remove,reactions.add,reactions.get,reactions.list,reactions.remove,reminders.add,reminders.complete,reminders.delete,reminders.info,reminders.list,rtm.connect,rtm.start,search.all,search.files,search.messages,stars.add,stars.list,stars.remove,team.accessLogs,team.billableInfo,team.info,team.integrationLogs,team.billing.info,team.externalTeams.list,team.preferences.list,team.profile.get,tooling.tokens.rotate,usergroups.create,usergroups.disable,usergroups.enable,usergroups.list,usergroups.update,usergroups.users.list,usergroups.users.update,users.conversations,users.deletePhoto,users.getPresence,users.identity,users.info,users.list,users.lookupByEmail,users.setActive,users.setPhoto,users.setPresence,users.profile.get,users.profile.set,views.open,views.publish,views.push,views.update,workflows.stepCompleted,workflows.stepFailed,workflows.updateStep,workflows.triggers.permissions.add,workflows.triggers.permissions.list,workflows.triggers.permissions.remove,workflows.triggers.permissions.set,channels.create,channels.info,channels.invite,channels.mark,groups.create,groups.info,groups.invite,groups.mark,groups.open,im.list,im.mark,im.open,mpim.list,mpim.mark,mpim.open".split( "," ) @@ -482,6 +482,9 @@ async def run_method(self, method_name, method, async_method): elif method_name == "conversations_canvases_create": self.api_methods_to_call.remove(method(channel_id="C123", document_content={})["method"]) await async_method(channel_id="C123", document_content={}) + elif method_name == "conversations_externalInvitePermissions_set": + self.api_methods_to_call.remove(method(action="upgrade", channel="C123", target_team="T123")["method"]) + await async_method(action="upgrade", channel="C123", target_team="T123") elif method_name == "canvases_access_set": self.api_methods_to_call.remove(method(canvas_id="F111", access_level="write")["method"]) await async_method(canvas_id="F111", access_level="write") From d61049b16fc61175f47fde954a66d1ba34db9593 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Tue, 25 Jun 2024 13:06:13 -0400 Subject: [PATCH 2/6] format integration tests --- integration_tests/web/test_conversations_connect.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration_tests/web/test_conversations_connect.py b/integration_tests/web/test_conversations_connect.py index a317da33b..a40ee82a3 100644 --- a/integration_tests/web/test_conversations_connect.py +++ b/integration_tests/web/test_conversations_connect.py @@ -138,8 +138,10 @@ async def test_async(self): # receiver attempt to approve invite already accepted by an admin level token should fail with self.assertRaises(SlackApiError): await receiver.conversations_approveSharedInvite(invite_id=invite["invite_id"]) - - sender_approval = await sender.conversations_acceptSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) + + sender_approval = await sender.conversations_acceptSharedInvite( + invite_id=invite["invite_id"], team_id=connect_team_id + ) self.assertIsNone(sender_approval["error"]) downgrade = await sender.conversations_externalInvitePermissions_set( From 1a78d06f737b4ec5fee479465560783b96e72128 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 26 Jun 2024 09:54:26 -0400 Subject: [PATCH 3/6] Update slack_sdk/web/client.py Co-authored-by: Kazuhiro Sera --- slack_sdk/web/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slack_sdk/web/client.py b/slack_sdk/web/client.py index 79c82fd6e..741cace8e 100644 --- a/slack_sdk/web/client.py +++ b/slack_sdk/web/client.py @@ -2916,7 +2916,7 @@ def conversations_externalInvitePermissions_set( "target_team": target_team, } ) - return self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + return self.api_call("conversations.externalInvitePermissions.set", params=kwargs) def conversations_history( self, From 2ff1c2f0f694147392fd453be7271208ee8ed4e0 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 26 Jun 2024 09:54:52 -0400 Subject: [PATCH 4/6] Fix the integration tests --- integration_tests/web/test_conversations_connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_tests/web/test_conversations_connect.py b/integration_tests/web/test_conversations_connect.py index a40ee82a3..5b4052ef6 100644 --- a/integration_tests/web/test_conversations_connect.py +++ b/integration_tests/web/test_conversations_connect.py @@ -81,7 +81,7 @@ def test_sync(self): invite_id=invite["invite_id"], ) - sender_approval = sender.conversations_acceptSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) + sender_approval = sender.conversations_approveSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) self.assertIsNone(sender_approval["error"]) downgrade = sender.conversations_externalInvitePermissions_set( @@ -139,7 +139,7 @@ async def test_async(self): with self.assertRaises(SlackApiError): await receiver.conversations_approveSharedInvite(invite_id=invite["invite_id"]) - sender_approval = await sender.conversations_acceptSharedInvite( + sender_approval = await sender.conversations_approveSharedInvite( invite_id=invite["invite_id"], team_id=connect_team_id ) self.assertIsNone(sender_approval["error"]) From 44194d4d6e82f50e7b00be9472ee21080a0d4e9d Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Wed, 26 Jun 2024 10:02:33 -0400 Subject: [PATCH 5/6] Formate tests --- integration_tests/web/test_conversations_connect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration_tests/web/test_conversations_connect.py b/integration_tests/web/test_conversations_connect.py index 5b4052ef6..0e5271c8f 100644 --- a/integration_tests/web/test_conversations_connect.py +++ b/integration_tests/web/test_conversations_connect.py @@ -81,7 +81,9 @@ def test_sync(self): invite_id=invite["invite_id"], ) - sender_approval = sender.conversations_approveSharedInvite(invite_id=invite["invite_id"], team_id=connect_team_id) + sender_approval = sender.conversations_approveSharedInvite( + invite_id=invite["invite_id"], team_id=connect_team_id + ) self.assertIsNone(sender_approval["error"]) downgrade = sender.conversations_externalInvitePermissions_set( From 164759fe678d3427ffa23be1138f92746a03283d Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Tue, 2 Jul 2024 12:08:17 -0400 Subject: [PATCH 6/6] Fix with codegen --- slack_sdk/web/async_client.py | 2 +- slack_sdk/web/legacy_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slack_sdk/web/async_client.py b/slack_sdk/web/async_client.py index 056864767..25e0fac0f 100644 --- a/slack_sdk/web/async_client.py +++ b/slack_sdk/web/async_client.py @@ -2925,7 +2925,7 @@ async def conversations_externalInvitePermissions_set( "target_team": target_team, } ) - return await self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + return await self.api_call("conversations.externalInvitePermissions.set", params=kwargs) async def conversations_history( self, diff --git a/slack_sdk/web/legacy_client.py b/slack_sdk/web/legacy_client.py index a4623a4d4..3b4f7cb64 100644 --- a/slack_sdk/web/legacy_client.py +++ b/slack_sdk/web/legacy_client.py @@ -2927,7 +2927,7 @@ def conversations_externalInvitePermissions_set( "target_team": target_team, } ) - return self.api_call("conversations.externalInvitePermissions.set", http_verb="GET", params=kwargs) + return self.api_call("conversations.externalInvitePermissions.set", params=kwargs) def conversations_history( self,