From 57a69eea50a5cb0daf3437ad60af1faa10fe0467 Mon Sep 17 00:00:00 2001 From: trisua Date: Thu, 19 Jun 2025 15:52:46 -0400 Subject: [PATCH] add: increase note character limit (16384 (*16)-> 262144) --- crates/core/src/database/notes.rs | 2 +- crates/core/src/database/posts.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/core/src/database/notes.rs b/crates/core/src/database/notes.rs index d3fd0b7..d46394b 100644 --- a/crates/core/src/database/notes.rs +++ b/crates/core/src/database/notes.rs @@ -78,7 +78,7 @@ impl DataManager { if data.content.len() < 2 { 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())); } diff --git a/crates/core/src/database/posts.rs b/crates/core/src/database/posts.rs index 29dd75a..eeef882 100644 --- a/crates/core/src/database/posts.rs +++ b/crates/core/src/database/posts.rs @@ -713,10 +713,10 @@ impl DataManager { /// To be considered a "great post", a post must have a score ((likes - dislikes) / (likes + dislikes)) /// 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 { // 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 Ok(c) = cached.parse() { return c;