add: increase note character limit (16384 (*16)-> 262144)

This commit is contained in:
trisua 2025-06-19 15:52:46 -04:00
parent c1568ad866
commit 57a69eea50
2 changed files with 3 additions and 3 deletions

View file

@ -78,7 +78,7 @@ impl DataManager {
if data.content.len() < 2 { if data.content.len() < 2 {
return Err(Error::DataTooShort("content".to_string())); return Err(Error::DataTooShort("content".to_string()));
} else if data.content.len() > 16384 { } else if data.content.len() > 262144 {
return Err(Error::DataTooLong("content".to_string())); return Err(Error::DataTooLong("content".to_string()));
} }

View file

@ -713,10 +713,10 @@ impl DataManager {
/// To be considered a "great post", a post must have a score ((likes - dislikes) / (likes + dislikes)) /// To be considered a "great post", a post must have a score ((likes - dislikes) / (likes + dislikes))
/// of at least 0.6. /// of at least 0.6.
/// ///
/// GPA is calculated based on the user's last 250 posts. /// GPA is calculated based on the user's last 48 posts.
pub async fn calculate_user_gpa(&self, id: usize) -> f32 { pub async fn calculate_user_gpa(&self, id: usize) -> f32 {
// just for note, this is SUPER bad for performance... which is why we // just for note, this is SUPER bad for performance... which is why we
// only calculate this when it expires in the cache (every week) // only calculate this when it expires in the cache (every day)
if let Some(cached) = self.0.1.get(format!("atto.user.gpa:{}", id)).await { if let Some(cached) = self.0.1.get(format!("atto.user.gpa:{}", id)).await {
if let Ok(c) = cached.parse() { if let Ok(c) = cached.parse() {
return c; return c;