聊天室信息发送
This commit is contained in:
parent
d6b62f282b
commit
082aedafdf
|
|
@ -39,10 +39,10 @@ public class ChatRoom {
|
||||||
*/
|
*/
|
||||||
@OnOpen
|
@OnOpen
|
||||||
public void onOpen(Session session, @PathParam("roomId") String roomId) {
|
public void onOpen(Session session, @PathParam("roomId") String roomId) {
|
||||||
// if (getRoomCache().createSuccess(roomId)) {
|
if (getRoomCache().createSuccess(roomId)) {
|
||||||
// this.sendMessage("无此房间,拒绝连接", session);
|
this.sendMessage("无此房间,拒绝连接", session);
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
Principal userPrincipal = session.getUserPrincipal();
|
Principal userPrincipal = session.getUserPrincipal();
|
||||||
if (Objects.isNull(userPrincipal)) {
|
if (Objects.isNull(userPrincipal)) {
|
||||||
this.sendMessage("用户验证失败,拒绝连接", session);
|
this.sendMessage("用户验证失败,拒绝连接", session);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue