修改华为融合通信 单呼 -> 多呼
This commit is contained in:
parent
84b0a0438f
commit
73d287a877
@ -9,6 +9,9 @@ import ink.wgink.module.instantmessage.websocket.pojo.WebSocketClientMessage;
|
|||||||
import ink.wgink.pojo.session.WebSocketSession;
|
import ink.wgink.pojo.session.WebSocketSession;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: VideoCallServiceImpl
|
* @ClassName: VideoCallServiceImpl
|
||||||
* @Description: 视频通话
|
* @Description: 视频通话
|
||||||
@ -21,12 +24,14 @@ public class HuaweiRtcServiceImpl implements IHuaweiRtcService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rtcCall(WebSocketClientMessage webSocketClientMessage) throws UserOfflineException {
|
public void rtcCall(WebSocketClientMessage webSocketClientMessage) throws UserOfflineException {
|
||||||
String receiverUserId = webSocketClientMessage.getTo();
|
List<String> receiverUserIds = Arrays.asList(webSocketClientMessage.getTo().split(","));
|
||||||
WebSocketSession onlineUser = WebSocketChannelManager.getInstance().getOnlineUser(receiverUserId, ISmartCityUserCenterConsts.APP_CLIENT_NAME);
|
List<WebSocketSession> onlineUsers = WebSocketChannelManager.getInstance().listOnlineUser(receiverUserIds, ISmartCityUserCenterConsts.APP_CLIENT_NAME);
|
||||||
if (onlineUser == null) {
|
if (onlineUsers.isEmpty()) {
|
||||||
throw new RtcUserOfflineException("用户不在线");
|
throw new RtcUserOfflineException("没有在线用户");
|
||||||
}
|
}
|
||||||
WebSocketChannelManager.getInstance().sendText(onlineUser.getChannel(), webSocketClientMessage);
|
onlineUsers.forEach(onlineUser -> {
|
||||||
|
WebSocketChannelManager.getInstance().sendText(onlineUser.getChannel(), webSocketClientMessage);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user