fix: don't show dislikes to regular users
This commit is contained in:
parent
0ae283ad8e
commit
a4d7f44aa3
4 changed files with 53 additions and 10 deletions
|
@ -998,7 +998,15 @@ pub async fn likes_request(
|
|||
// ...
|
||||
let ignore_users = data.0.get_userblocks_receivers(user.id).await;
|
||||
|
||||
let list = match data.0.get_reactions_by_asset(post.id, 12, props.page).await {
|
||||
let list = match if user.permissions.check(FinePermission::MANAGE_REACTIONS) {
|
||||
// all reactions
|
||||
data.0.get_reactions_by_asset(post.id, 12, props.page).await
|
||||
} else {
|
||||
// only likes
|
||||
data.0
|
||||
.get_likes_reactions_by_asset(post.id, 12, props.page)
|
||||
.await
|
||||
} {
|
||||
Ok(p) => match data.0.fill_reactions(&p, ignore_users).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &Some(user)).await)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue