Skip to content

Commit 4e8f184

Browse files
committed
feat: 누락된 데이터 추가
Related to: #136
1 parent 313f17e commit 4e8f184

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/java/com/hf/healthfriend/domain/chat/dto/response/ChatroomListResponseDto.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.hf.healthfriend.domain.matching.constant.MatchingStatus;
44
import lombok.Builder;
55

6+
import java.time.LocalDateTime;
7+
68
@Builder
79
public record ChatroomListResponseDto(
810
Long chatroomId,
@@ -11,6 +13,7 @@ public record ChatroomListResponseDto(
1113
String opponentParticipantProfileImageUrl,
1214
MatchingStatus matchingStatus,
1315
String lastChatMessage,
16+
LocalDateTime chatSentTime,
1417
Integer unreadMessageCount
1518
) {
1619
}

src/main/java/com/hf/healthfriend/domain/chat/service/ChatService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public List<ChatroomListResponseDto> getChatroomList(Long participantId,
7575
.opponentParticipantProfileImageUrl(this.fileUrlResolver.resolveFileUrl(dto.opponentParticipantProfileImageUrl()))
7676
.matchingStatus(dto.matchingStatus())
7777
.lastChatMessage(dto.chatroom().getLastChatMessage().getMessageAsText())
78+
.chatSentTime(dto.chatroom().getCreationTime()) // lastModified를 반환하는 게 맞을까?
7879
.unreadMessageCount(dto.chatroom().getUnreadMessageCount())
7980
.build()
8081
)

0 commit comments

Comments
 (0)