diff --git a/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java b/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java index 93ee6dbb5d11..d522170180f5 100644 --- a/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java +++ b/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java @@ -64,7 +64,7 @@ default Conversation findByIdElseThrow(long conversationId) { LEFT JOIN Post p ON conv.id = p.conversation.id AND (p.creationDate > cp.lastRead OR (channel.isCourseWide IS true AND cp.lastRead IS null)) WHERE conv.id IN :conversationIds AND (channel.isCourseWide IS true OR (conv.id = cp.conversation.id AND cp.user.id = :userId)) - GROUP BY conv.id + GROUP BY conv.id, cp.id, cp.isModerator, cp.isFavorite, cp.isHidden, cp.lastRead """) List getUserInformationForConversations(@Param("conversationIds") Iterable conversationIds, @Param("userId") Long userId);