Skip to main content

Module credit_registration_account_linking_emails

Module credit_registration_account_linking_emails 

Source
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§

CreditRegistrationAccountLinkingEmail
NewAccountLinkingEmail

Functions§

claim_send_slot
Claims the right to mail this (person, course, address) exactly once. None means 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.