mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Hide followed communities, except for own user (fixes #1303)
This commit is contained in:
parent
08900b5b94
commit
3d400ca21d
1 changed files with 9 additions and 4 deletions
|
@ -563,10 +563,15 @@ impl Perform for GetUserDetails {
|
|||
})
|
||||
.await??;
|
||||
|
||||
let follows = blocking(context.pool(), move |conn| {
|
||||
CommunityFollowerView::for_user(conn, user_details_id)
|
||||
})
|
||||
.await??;
|
||||
let mut follows = vec![];
|
||||
if let Some(uid) = user_id {
|
||||
if uid == user_details_id {
|
||||
follows = blocking(context.pool(), move |conn| {
|
||||
CommunityFollowerView::for_user(conn, user_details_id)
|
||||
})
|
||||
.await??;
|
||||
}
|
||||
};
|
||||
let moderates = blocking(context.pool(), move |conn| {
|
||||
CommunityModeratorView::for_user(conn, user_details_id)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue