机器人API添加定向消息参数

This commit is contained in:
heavyrian2012
2025-01-17 20:17:18 +08:00
parent 9191204bb0
commit cb3a82559d
@@ -24,10 +24,15 @@ public class RobotService {
}
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;
SendMessageData messageData = new SendMessageData();
messageData.setSender(sender);
messageData.setConv(conversation);
messageData.setToUsers(toUsers);
messageData.setPayload(payload);
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
}