Emails: templates, branded HTML, audiences, opt-out, log; admin UI
This commit is contained in:
8 files changed
+723
-8
No files matched your search
@@ -759,6 +759,21 @@ const MIGRATIONS: &[&str] = &[
|
||||
VALUES (NEW.user_uuid, 'achievement', NEW.achievement_id, strftime('%Y-%m-%dT%H:%M:%SZ', 'now'));
|
||||
END;
|
||||
"#,
|
||||
// Emails sent from the panel: players can opt out of non-essential mail, and every send is logged.
|
||||
r#"
|
||||
ALTER TABLE users ADD COLUMN email_optout INTEGER NOT NULL DEFAULT 0;
|
||||
CREATE TABLE email_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
subject TEXT NOT NULL,
|
||||
audience TEXT NOT NULL,
|
||||
total INTEGER NOT NULL DEFAULT 0,
|
||||
sent INTEGER NOT NULL DEFAULT 0,
|
||||
failed INTEGER NOT NULL DEFAULT 0,
|
||||
last_error TEXT,
|
||||
started_at TEXT NOT NULL,
|
||||
finished_at TEXT
|
||||
);
|
||||
"#,
|
||||
];
|
||||
|
||||
pub async fn connect(data_dir: &Path) -> Result<SqlitePool> {
|
||||
|
||||
Reference in new issue
Block a user