09-12-netty发送房间确认信息逻辑优化
This commit is contained in:
@ -425,13 +425,16 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
||||
if (channelHandlerContexts == null||channelHandlerContexts.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("type", "5");
|
||||
jsonObject.put("roomInfo", chatGroup);
|
||||
|
||||
for (ChannelHandlerContext channelHandlerContext : channelHandlerContexts) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("type", "5");
|
||||
jsonObject.put("roomInfo", chatGroup);
|
||||
sendMessage(channelHandlerContext, String.valueOf(jsonObject));
|
||||
log.info("发送房间创建确认消息:{}",jsonObject);
|
||||
}
|
||||
|
||||
log.info("发送房间创建确认消息:{}",jsonObject);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user