fix: don't show posts from private profiles when quoted
fix: password updating (mod)
This commit is contained in:
parent
2ec56809b8
commit
03b252937b
8 changed files with 87 additions and 36 deletions
|
@ -351,7 +351,7 @@ pub async fn feed_request(
|
|||
.get_posts_by_community(community.id, 12, props.page)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
@ -359,7 +359,7 @@ pub async fn feed_request(
|
|||
};
|
||||
|
||||
let pinned = match data.0.get_pinned_posts_by_community(community.id).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
@ -609,7 +609,7 @@ pub async fn post_request(
|
|||
check_user_blocked_or_private!(user, owner, data, jar);
|
||||
|
||||
// check repost
|
||||
let reposting = data.0.get_post_reposting(&post, &ignore_users).await;
|
||||
let reposting = data.0.get_post_reposting(&post, &ignore_users, &user).await;
|
||||
|
||||
// check question
|
||||
let question = match data.0.get_post_question(&post, &ignore_users).await {
|
||||
|
@ -634,7 +634,7 @@ pub async fn post_request(
|
|||
};
|
||||
|
||||
let feed = match data.0.get_post_comments(post.id, 12, props.page).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
@ -730,7 +730,7 @@ pub async fn reposts_request(
|
|||
check_user_blocked_or_private!(user, owner, data, jar);
|
||||
|
||||
// check repost
|
||||
let reposting = data.0.get_post_reposting(&post, &ignore_users).await;
|
||||
let reposting = data.0.get_post_reposting(&post, &ignore_users, &user).await;
|
||||
|
||||
// check question
|
||||
let question = match data.0.get_post_question(&post, &ignore_users).await {
|
||||
|
@ -760,7 +760,7 @@ pub async fn reposts_request(
|
|||
.get_quoting_posts_by_quoting(post.id, 12, props.page)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
@ -768,7 +768,7 @@ pub async fn reposts_request(
|
|||
}
|
||||
} else {
|
||||
match data.0.get_reposts_by_quoting(post.id, 12, props.page).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
@ -882,7 +882,10 @@ pub async fn likes_request(
|
|||
}
|
||||
|
||||
// check repost
|
||||
let reposting = data.0.get_post_reposting(&post, &ignore_users).await;
|
||||
let reposting = data
|
||||
.0
|
||||
.get_post_reposting(&post, &ignore_users, &Some(user.clone()))
|
||||
.await;
|
||||
|
||||
// check question
|
||||
let question = match data.0.get_post_question(&post, &ignore_users).await {
|
||||
|
@ -1095,7 +1098,7 @@ pub async fn question_request(
|
|||
.get_posts_by_question(question.id, 12, props.page)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users).await {
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue