Expand description
Dedup ledger for account-linking mails.
Keyed on the Sisu person id plus the recipient address: at send time there is no account of ours to key on, and the student number changes when a student moves between programmes.
Structs§
Functions§
- claim_
send_ slot - Claims the right to mail this (person, course, address) exactly once.
Nonemeans a mail was already recorded and the caller must not send. - count_
sent_ for_ person_ and_ course - Backs the rate cap of at most a few mails ever per (person, course), even when tokens expire unused.
- count_
sent_ since - Backs the rate cap of at most one mail per Sisu person per window, across all courses.
- get_
by_ course_ id - get_
by_ sisu_ person_ id - soft_
delete - Lets a rate-cap override or an admin resend mail the same address again.