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.

999 B
Raw Blame
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
pub struct Settings {
    pub signature_on_replies_forwards: Option<bool>,
    /// The user's email signature content (HTML). On a patch, omit or send
    /// `null` to leave unchanged (both deserialize to `None`); pass an empty
    /// string to clear it. The column cannot be set to SQL NULL via patch.
    pub signature: Option<String>,
    /// Whether messages sent from this inbox carry an open-tracking pixel.
    pub read_receipts_enabled: Option<bool>,
}

impl From<crate::email::service::settings::Settings> for Settings {
    fn from(service_settings: crate::email::service::settings::Settings) -> Self {
        Settings {
            signature_on_replies_forwards: Some(service_settings.signature_on_replies_forwards),
            signature: service_settings.signature,
            read_receipts_enabled: Some(service_settings.read_receipts_enabled),
        }
    }
}