fix: check user show_nsfw in community timeline
This commit is contained in:
parent
612fbf5eb4
commit
958979cfa1
4 changed files with 23 additions and 4 deletions
|
@ -478,7 +478,10 @@ pub async fn community_posts_request(
|
|||
None => return Json(Error::NotAllowed.into()),
|
||||
};
|
||||
|
||||
match data.get_posts_by_community(id, 12, props.page).await {
|
||||
match data
|
||||
.get_posts_by_community(id, 12, props.page, &Some(user.clone()))
|
||||
.await
|
||||
{
|
||||
Ok(posts) => {
|
||||
let ignore_users = crate::ignore_users_gen!(user!, #data);
|
||||
Json(ApiReturn {
|
||||
|
|
|
@ -417,7 +417,7 @@ pub async fn feed_request(
|
|||
|
||||
let feed = match data
|
||||
.0
|
||||
.get_posts_by_community(community.id, 12, props.page)
|
||||
.get_posts_by_community(community.id, 12, props.page, &user)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
|
|
|
@ -161,7 +161,7 @@ pub async fn tickets_request(
|
|||
|
||||
let feed = match data
|
||||
.0
|
||||
.get_posts_by_community(community.id, 12, props.page)
|
||||
.get_posts_by_community(community.id, 12, props.page, &user)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue