Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Strohgelaender authored Nov 26, 2022
1 parent e3b4887 commit 4485715
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ public Conversation createConversation(Long courseId, Conversation conversation)
final Course course = checkUserAndCourse(user, courseId);

List<Conversation> existingConversations = conversationRepository.findConversationsOfUserWithConversationParticipants(course.getId(), user.getId());
Optional<Conversation> existingConversation = existingConversations.stream().filter((conversation1) -> conversation1.getConversationParticipants().stream()
.anyMatch(conversationParticipant -> conversationParticipant.getUser().getId().equals(
conversation.getConversationParticipants().iterator().next().getUser().getId())))
Optional<Conversation> existingConversation = existingConversations.stream().filter((conversation1) -> conversation1.getConversationParticipants().stream().anyMatch(
conversationParticipant -> conversationParticipant.getUser().getId().equals(conversation.getConversationParticipants().iterator().next().getUser().getId())))
.findAny();

if (!existingConversation.isPresent()) {
Expand Down

0 comments on commit 4485715

Please sign in to comment.