snooze: add UI elements and DB for snooze functionality

This commit is contained in:
2025-07-13 08:53:50 -07:00
parent 52b19365d7
commit 90ac9a1e43
11 changed files with 210 additions and 67 deletions

View File

@@ -637,6 +637,17 @@ impl MutationRoot {
wake_time: DateTime<Utc>,
) -> Result<bool, Error> {
info!("TODO snooze {query} until {wake_time})");
let pool = ctx.data_unchecked::<PgPool>();
sqlx::query!(
r#"
INSERT INTO snooze (message_id, wake)
VALUES ($1, $2)
"#,
query,
wake_time
)
.execute(pool)
.await?;
Ok(true)
}
/// Drop and recreate tantivy index. Warning this is slow