mirror of https://github.com/LemmyNet/lemmy.git
Merge pull request 'Hide followed communities, except for own user (fixes #1303)' (#168) from hide-followed into main
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/168pull/1435/head
commit
f37fd0ecfd
|
@ -563,10 +563,15 @@ impl Perform for GetUserDetails {
|
||||||
})
|
})
|
||||||
.await??;
|
.await??;
|
||||||
|
|
||||||
let follows = blocking(context.pool(), move |conn| {
|
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)
|
CommunityFollowerView::for_user(conn, user_details_id)
|
||||||
})
|
})
|
||||||
.await??;
|
.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)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue