Skip to content

Commit

Permalink
Merge pull request #332 from apeun-gidaechi/refactor
Browse files Browse the repository at this point in the history
Refactor :: 마지막 메시지값 불러올때 채팅만 불러오도록 변경
  • Loading branch information
yeseong0412 authored Oct 21, 2024
2 parents 65d1bba + 1d39524 commit d8d4057
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MessageServiceImpl(

@Transactional(readOnly = true)
override fun getLastMessage(roomId: String): MessageEntity? {
return messageRepository.findByChatRoomId(roomId).lastOrNull()
return messageRepository.findByChatRoomId(roomId).lastOrNull { it.type == Type.MESSAGE }
}

@Transactional(readOnly = true)
Expand Down

0 comments on commit d8d4057

Please sign in to comment.