From 9d65e10048d77473c33a718cf9bc48e864b5f300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=ED=95=98=EB=AF=BC?= Date: Sun, 28 Dec 2025 17:07:09 +0900 Subject: [PATCH] =?UTF-8?q?update=20::=20=EB=82=98=EA=B0=84=EB=B0=A9=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=95=88=20=EB=90=98=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/service/impl/GetChatRoomListServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/team/cklob/gami/domain/chat/service/impl/GetChatRoomListServiceImpl.java b/src/main/java/com/team/cklob/gami/domain/chat/service/impl/GetChatRoomListServiceImpl.java index 0ee5a4a..010f6f8 100644 --- a/src/main/java/com/team/cklob/gami/domain/chat/service/impl/GetChatRoomListServiceImpl.java +++ b/src/main/java/com/team/cklob/gami/domain/chat/service/impl/GetChatRoomListServiceImpl.java @@ -1,6 +1,7 @@ package com.team.cklob.gami.domain.chat.service.impl; import com.team.cklob.gami.domain.chat.entity.ChatRoom; +import com.team.cklob.gami.domain.chat.entity.constant.RoomStatus; import com.team.cklob.gami.domain.chat.dto.response.GetChatRoomListResponse; import com.team.cklob.gami.domain.chat.repository.ChatRoomRepository; import com.team.cklob.gami.domain.chat.service.GetChatRoomListService; @@ -31,7 +32,11 @@ public List execute() { Member member = memberUtil.getCurrentMember(); List chatRoomList = chatRoomRepository - .findAllByMentorIdOrMenteeId(member.getId()); + .findAllByMentorIdOrMenteeId(member.getId()) + .stream() + .filter(chatRoom -> chatRoom.getRoomStatus() == RoomStatus.ACTIVE) + .filter(chatRoom -> !chatRoom.hasLeft(member)) + .toList(); List otherMemberIds = chatRoomList.stream() .map(chatRoom -> { @@ -67,4 +72,4 @@ public List execute() { }) .toList(); } -} +} \ No newline at end of file