Skip to content

Commit

Permalink
Refactor: 안 읽은 메시지 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
imjanghyeok committed May 15, 2024
1 parent 59d9ca2 commit 0214f84
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,21 @@ private void saveUnReadMessage(String destination, MessageResponse messageRespon
Boolean isUnRead = redisTemplate.hasKey(destination);
log.info(isUnRead.toString());
if (isUnRead) {
messageResponse.setMethod("connectChat");
redisTemplate.opsForList().rightPush(destination, messageResponse);
} else {
messageResponse.setMethod("connectChat");
redisTemplate.opsForList().rightPush(destination, messageResponse);
}
}

private void saveUnReadHeart(String destination, SendHeartResponse sendHeartResponse) {
Boolean isUnRead = redisTemplate.hasKey(destination);
if (isUnRead) {
sendHeartResponse.setMethod("connectHeart");
redisTemplate.opsForList().rightPush(destination, sendHeartResponse);
} else {
sendHeartResponse.setMethod("connectHeart");
redisTemplate.opsForList().rightPush(destination, sendHeartResponse);
}
}
Expand Down

0 comments on commit 0214f84

Please sign in to comment.