聊天记录
This commit is contained in:
@@ -18,9 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Slf4j
|
||||
@@ -65,11 +63,6 @@ public class ImCallHistoryService {
|
||||
Integer i = Long.valueOf(seconds).intValue();
|
||||
imCallHistory.setContinueSecond(i);
|
||||
|
||||
log.error("===================结束之后通知客户端");
|
||||
log.error("===================结束之后通知客户端");
|
||||
log.error("===================结束之后通知客户端");
|
||||
|
||||
|
||||
|
||||
//TODO 结束之后通知客户端
|
||||
SendMessageReq req= new SendMessageReq();
|
||||
@@ -78,11 +71,19 @@ public class ImCallHistoryService {
|
||||
req.setToId(imCallHistory.getPassiveId());
|
||||
req.setMessageTime(System.currentTimeMillis());
|
||||
// req.setMessageRandom();
|
||||
req.setMessageBody(JSONObject.toJSONString(imCallHistory));
|
||||
|
||||
req.setMessageId(UUID.randomUUID().toString().replace("-", ""));
|
||||
req.setImei("uniapp");
|
||||
req.setClientType(1);
|
||||
|
||||
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("userId", imCallHistory.getInviteId());
|
||||
data.put("msgType", "CALL_"+imCallHistory.getType());
|
||||
data.put("content", JSONObject.toJSONString(imCallHistory));
|
||||
|
||||
req.setMessageBody(JSONObject.toJSONString(data));
|
||||
|
||||
p2PMessageService.send(req);
|
||||
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
//如果浏览器支持WebSocket
|
||||
if (window.WebSocket) {
|
||||
//参数就是与服务器连接的地址
|
||||
socket = new WebSocket("ws://192.168.1.117:19000/ws");
|
||||
socket = new WebSocket("ws://119.45.242.222:29001/ws");
|
||||
|
||||
//客户端收到服务器消息的时候就会执行这个回调方法
|
||||
socket.onmessage = function (event) {
|
||||
|
||||
Reference in New Issue
Block a user