- let parent_path_cloned = parent_path.clone();
- let post_id = data.post_id;
- let local_user = local_user_view.map(|l| l.local_user);
- let mut comments = CommentQuery::builder()
- .pool(context.pool())
- .listing_type(Some(listing_type))
- .sort(sort)
- .max_depth(max_depth)
- .saved_only(saved_only)
- .community_id(community_id)
- .community_actor_id(community_actor_id)
- .parent_path(parent_path_cloned)
- .post_id(post_id)
- .local_user(local_user.as_ref())
- .page(page)
- .limit(limit)
- .build()
- .list()
- .await
- .map_err(|e| LemmyError::from_error_message(e, "couldnt_get_comments"))?;