services/notifications/dnd
DND (Do Not Disturb) — runtime-managed quiet hours.
DND rules are stored in SQLite and managed via admin commands.
The is_quiet_now function is called by notification tools before sending.
Types
Values
pub fn add_rule(
conn: sqlight.Connection,
rule_type: String,
start_time: String,
end_time: String,
) -> Result(String, String)
pub fn is_quiet_now(
conn: sqlight.Connection,
timezone: String,
) -> Bool
pub fn list_active(
conn: sqlight.Connection,
) -> Result(List(DndRule), String)
pub fn list_all(
conn: sqlight.Connection,
) -> Result(List(DndRule), String)
pub fn remove_all(
conn: sqlight.Connection,
) -> Result(Int, String)
pub fn remove_rule(
conn: sqlight.Connection,
id: Int,
) -> Result(Nil, String)
pub fn toggle_indefinite(
conn: sqlight.Connection,
) -> Result(String, String)