机器人API添加定向消息参数
This commit is contained in:
@@ -24,10 +24,15 @@ public class RobotService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IMResult<SendMessageResult> sendMessage(String sender, Conversation conversation, MessagePayload payload) throws Exception {
|
public IMResult<SendMessageResult> sendMessage(String sender, Conversation conversation, MessagePayload payload) throws Exception {
|
||||||
|
return sendMessage(sender, conversation, payload, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMResult<SendMessageResult> sendMessage(String sender, Conversation conversation, MessagePayload payload, List<String> toUsers) throws Exception {
|
||||||
String path = APIPath.Robot_Message_Send;
|
String path = APIPath.Robot_Message_Send;
|
||||||
SendMessageData messageData = new SendMessageData();
|
SendMessageData messageData = new SendMessageData();
|
||||||
messageData.setSender(sender);
|
messageData.setSender(sender);
|
||||||
messageData.setConv(conversation);
|
messageData.setConv(conversation);
|
||||||
|
messageData.setToUsers(toUsers);
|
||||||
messageData.setPayload(payload);
|
messageData.setPayload(payload);
|
||||||
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
|
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user