コード例 #1
0
 @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;
 }
コード例 #2
0
 @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;
 }