diff --git a/src/main/kotlin/mara/server/domain/share/ShareRepository.kt b/src/main/kotlin/mara/server/domain/share/ShareRepository.kt index 247dfd7..391d6ff 100644 --- a/src/main/kotlin/mara/server/domain/share/ShareRepository.kt +++ b/src/main/kotlin/mara/server/domain/share/ShareRepository.kt @@ -33,7 +33,9 @@ class CustomShareRepositoryImpl( override fun findAllMyFriendsShare(pageable: Pageable, status: ShareStatus, user: User): Page { val friendsList = queryFactory.select(friendship.toUser.userId) .from(friendship) - .where(friendship.fromUser.eq(user)) + .where(friendship.fromUser.eq(user)).fetch() + + friendsList.add(user.userId) var sortBy = registeredDate pageable.sort.forEach { order ->