Skip to content

Commit

Permalink
[fix]:Socket #127 채팅방 생성 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuKwanKon committed Nov 18, 2023
1 parent 9516ef5 commit 82226a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ private String getReceivedUserName(Chat chat, String user) {

private Chat findFirstChatBySessions(Long firstSessionId, Long secondSessionId) {
Query query = new Query();
query.addCriteria(Criteria.where("sessionList").all(firstSessionId, secondSessionId));
query.addCriteria(Criteria.where("chatUserList.sessionId").all(firstSessionId, secondSessionId));
return mongoTemplate.findOne(query, Chat.class);
}

private List<Chat> findChatListBySession(Long sessionId) {
Query query = new Query();
query.addCriteria(Criteria.where("sessionList").all(sessionId));
query.addCriteria(Criteria.where("chatUserList.sessionId").all(sessionId));
return mongoTemplate.find(query, Chat.class);
}

Expand Down

0 comments on commit 82226a1

Please sign in to comment.