Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

342 B
Raw Blame
pub async fn is_chat_deleted(db: sqlx::PgPool, chat_id: &str) -> anyhow::Result<bool> {
    let is_deleted = sqlx::query!(
        r#"
        SELECT "deletedAt" as "deleted_at"
        FROM "Chat"
        WHERE id = $1
    "#,
        chat_id
    )
    .map(|r| r.deleted_at.is_some())
    .fetch_one(&db)
    .await?;

    Ok(is_deleted)
}