Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 482b34d

Browse files
committed
fix: conversation creation with empty message list
1 parent 3916a31 commit 482b34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

back/src/main/java/com/openclassrooms/ycyw/service/command/ConversationCommandService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ConversationResponse startConversationBetweenTwoUser(Long userId1, Long u
4141
}
4242

4343
// Create conversation
44-
ConversationEntity conversation = ConversationEntity.builder().name("Conversation").build();
44+
ConversationEntity conversation = ConversationEntity.builder().name("Conversation").messages(List.of()).build();
4545
conversation = conversationRepository.save(conversation);
4646

4747
// Add participants

0 commit comments

Comments
 (0)