Skip to content
New issue

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

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

Already on GitHub? # to your account

Incorrect parameter name for conversations.invite command #284

Closed
sergey-morenets opened this issue Aug 28, 2021 · 3 comments
Closed

Incorrect parameter name for conversations.invite command #284

sergey-morenets opened this issue Aug 28, 2021 · 3 comments

Comments

@sergey-morenets
Copy link

Hi

Current implementation of inviteToChannel method uses "user" parameter to pass user identifier to Slack API:

@Override
public SlackMessageHandle<SlackChannelReply> inviteToChannel(SlackChannel channel, SlackUser user) {
  SlackMessageHandle<SlackChannelReply> handle = new SlackMessageHandle<>(getNextMessageId());
  Map<String, String> arguments = new HashMap<>();
  arguments.put("token", authToken);
  arguments.put("channel", channel.getId());
  arguments.put("user", user.getId());
  postSlackCommand(arguments, CONVERSATION.INVITE_COMMAND, handle, SlackChannelReply.class);
  return handle;
}

However current conversations.invite command uses "users" argument (https://api.slack.com/methods/conversations.invite). So any request to invite a valid user to the channel always returns "no_user" error.

moults31 added a commit to moults31/simple-slack-api that referenced this issue Nov 7, 2021
Fix Itiviti#284 - Update param user->users in conversations.invite
@moults31
Copy link
Contributor

moults31 commented Nov 7, 2021

Fixed on my fork in moults31#5. It's a simple fix as expected, but note that it depends on #283 if you don't have a legacy Slack app.

@sergey-morenets
Copy link
Author

Fixed on my fork in moults31#5. It's a simple fix as expected, but note that it depends on #283 if you don't have a legacy Slack app.

Thank you, @moults31

@sergey-morenets
Copy link
Author

Hi @bcorne

When are you going to publish new version? It seems that 1.3.0(last published) doesn't contain this fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants