add: "ask about this" from neospring

This commit is contained in:
trisua 2025-07-13 18:42:08 -04:00
parent f94570f74c
commit 2c83ed3d9d
9 changed files with 122 additions and 31 deletions

View file

@ -1,3 +1,5 @@
use std::collections::HashMap;
use super::{render_error, PaginatedQuery, RepostsQuery, SearchedQuery};
use crate::{
assets::initial_context, check_user_blocked_or_private, get_lang, get_user_from_token, State,
@ -798,7 +800,11 @@ pub async fn post_request(
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 {
let question = match data
.0
.get_post_question(&post, &ignore_users, &mut HashMap::new())
.await
{
Ok(q) => q,
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
};
@ -918,7 +924,11 @@ pub async fn reposts_request(
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 {
let question = match data
.0
.get_post_question(&post, &ignore_users, &mut HashMap::new())
.await
{
Ok(q) => q,
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
};
@ -1069,7 +1079,11 @@ pub async fn likes_request(
.await;
// check question
let question = match data.0.get_post_question(&post, &ignore_users).await {
let question = match data
.0
.get_post_question(&post, &ignore_users, &mut HashMap::new())
.await
{
Ok(q) => q,
Err(e) => return Err(Html(render_error(e, &jar, &data, &Some(user)).await)),
};