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