Forum: e-mail notifications with a daily digest
Members choose per kind: replies to them (daily digest, instant or off), new posts in followed threads (daily or off), private messages and requests (instant or off). The forum service queues the instant e-mails (none while online, at most one per thread an hour); the worker's new forum task makes the evening digest of what is unread. Every forum e-mail greets by the nickname and has a one-click unsubscribe (RFC 8058). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -288,11 +288,15 @@ async fn cleanup_removes_only_expired_data(db: PgPool) {
|
||||
fn worker_tasks_are_chosen_by_name() {
|
||||
use crate::config::Tasks;
|
||||
let mail = Tasks::parse("email, cleanup").unwrap();
|
||||
assert_eq!(mail, Tasks { email: true, cleanup: true, analyses: false, invoices: false, notify: false });
|
||||
assert_eq!(
|
||||
mail,
|
||||
Tasks { email: true, cleanup: true, analyses: false, invoices: false, notify: false, forum: false }
|
||||
);
|
||||
assert_eq!(
|
||||
Tasks::parse("analyses").unwrap(),
|
||||
Tasks { email: false, cleanup: false, analyses: true, invoices: false, notify: false }
|
||||
Tasks { email: false, cleanup: false, analyses: true, invoices: false, notify: false, forum: false }
|
||||
);
|
||||
assert!(Tasks::parse("email,forum").unwrap().forum);
|
||||
assert!(Tasks::parse("email,invoices").unwrap().invoices);
|
||||
assert!(Tasks::parse("email,cleanup,invoices,notify").unwrap().notify);
|
||||
assert!(Tasks::parse("emails").is_err());
|
||||
|
||||
Reference in New Issue
Block a user