Fix missing local user from post queries. (#2447)

This commit is contained in:
Dessalines 2022-09-26 10:39:22 -04:00 committed by GitHub
parent c9f1407429
commit 9ce15ed071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ impl PerformCrud for GetPosts {
let mut posts = blocking(context.pool(), move |conn| {
PostQuery::builder()
.conn(conn)
.local_user(local_user_view.map(|l| l.local_user).as_ref())
.listing_type(Some(listing_type))
.sort(sort)
.community_id(community_id)

View File

@ -68,9 +68,9 @@ impl PerformCrud for GetPersonDetails {
let posts = blocking(context.pool(), move |conn| {
let posts_query = PostQuery::builder()
.conn(conn)
.local_user(local_user.as_ref())
.sort(sort)
.saved_only(saved_only)
.local_user(local_user.as_ref())
.community_id(community_id)
.page(page)
.limit(limit);