diff --git a/src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageResponseDTO.kt b/src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageResponseDTO.kt index ff15f18..e53fdb7 100644 --- a/src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageResponseDTO.kt +++ b/src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageResponseDTO.kt @@ -1,5 +1,6 @@ package busanVibe.busan.domain.chat.dto.websocket +import busanVibe.busan.domain.chat.enums.MessageType import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.PropertyNamingStrategies import com.fasterxml.jackson.databind.annotation.JsonNaming @@ -20,7 +21,8 @@ class ChatMessageResponseDTO { val content: String, val dateTime: LocalDateTime?, @get:JsonProperty("is_my") - val isMy: Boolean + val isMy: Boolean, + val type: MessageType ) } \ No newline at end of file diff --git a/src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt b/src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt index 2442785..ab53902 100644 --- a/src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt +++ b/src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt @@ -170,7 +170,8 @@ class ChatMongoService( userImage = user?.profileImageUrl, dateTime = chat.time, content = chat.message, - isMy = user?.id == currentUser.id + isMy = user?.id == currentUser.id, + type = chat.type ) }