Hide followed communities, except for own user (fixes #1303)

pull/1435/head
Felix Ableitner 2021-02-11 14:53:17 +01:00
parent 08900b5b94
commit 3d400ca21d
1 changed files with 9 additions and 4 deletions

View File

@ -563,10 +563,15 @@ impl Perform for GetUserDetails {
}) })
.await??; .await??;
let follows = blocking(context.pool(), move |conn| { let mut follows = vec![];
CommunityFollowerView::for_user(conn, user_details_id) if let Some(uid) = user_id {
}) if uid == user_details_id {
.await??; follows = blocking(context.pool(), move |conn| {
CommunityFollowerView::for_user(conn, user_details_id)
})
.await??;
}
};
let moderates = blocking(context.pool(), move |conn| { let moderates = blocking(context.pool(), move |conn| {
CommunityModeratorView::for_user(conn, user_details_id) CommunityModeratorView::for_user(conn, user_details_id)
}) })