Invitation-only sign-up, invitation e-mails and waitlist
- SIGNUP_MODE=invite (default): a new account needs an open invitation for its address, or the invitation link (then any Google account will do) - admin page "Meghívók": invite many addresses at once, personal message, resend (max 3, 24 h apart), revoke, copy link, mail preview and test copy, waitlist - invitation e-mail in HTML and plain text; Message-ID on the sender's domain, List-Unsubscribe with one-click POST, opt-out list (hashes only) - e-mail texts moved to a shared crate (crates/email-templates) - login page shows the invitation; waitlist for uninvited visitors; unsubscribe page; privacy policy updated - docs/levelkuldes.md: Brevo, DNS (SPF, DKIM, DMARC) and the SMTP setup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -9,6 +9,7 @@ publish.workspace = true
|
||||
[dependencies]
|
||||
db.workspace = true
|
||||
analysis-prompt.workspace = true
|
||||
email-templates.workspace = true
|
||||
service-kit.workspace = true
|
||||
anyhow.workspace = true
|
||||
axum.workspace = true
|
||||
|
||||
@@ -9,13 +9,15 @@ Háttérmunkák a közös PostgreSQL-adatbázis fölött: e-mail-küldés, szöv
|
||||
- A sorokat `FOR UPDATE SKIP LOCKED` zárolással veszi fel, ezért több worker is futhat egyszerre, és nem küldik el kétszer ugyanazt. A kézbesítés „legalább egyszer” elvű: ha a worker éppen küldés közben áll le, a levél újra kimehet.
|
||||
- Átmeneti hibánál (hálózat, SMTP 4xx) újrapróbálja 1, 2, 4, … percenként, legfeljebb 6 óránként. `MAX_EMAIL_ATTEMPTS` próbálkozás után a levelet sikertelennek jelöli (`failed_at`, `last_error`).
|
||||
- Végleges hibánál nem próbálja újra: ilyen a hibás cím, az SMTP 5xx és az ismeretlen sablon.
|
||||
- Sablonok magyarul és angolul, a felhasználó nyelve szerint (`src/templates.rs`): `verify_email`, `reset_password`, `invite_accepted`. Mindegyik szöveges és HTML-változatban megy ki; a felhasználó nevét HTML-ben escape-eli, és a vezérlőkaraktereket eltávolítja belőle.
|
||||
- Sablonok magyarul és angolul, a címzett nyelve szerint (`crates/email-templates`, a backend admin-előnézete is ezt használja): `verify_email`, `reset_password`, `invite_accepted`, `invitation`. Mindegyik szöveges és HTML-változatban megy ki; a felhasználói szöveget HTML-ben escape-eli, és a vezérlőkaraktereket eltávolítja belőle.
|
||||
- A spamszűrők miatt a `Message-ID` a feladó domainjén van (`<outbox-id@domain>`), a meghívóknál pedig `List-Unsubscribe` és `List-Unsubscribe-Post` fejléc is megy (egykattintásos leiratkozás). Élesítés: `docs/levelkuldes.md`.
|
||||
- Ha nincs `SMTP_URL`, a worker nem küld semmit, a levelek az outboxban várnak.
|
||||
|
||||
**Takarítás** (induláskor, majd óránként)
|
||||
- lejárt munkamenetek és e-mail-tokenek;
|
||||
- elküldött e-mailek 7 nap után (tokenes linkek vannak bennük), sikertelenek 30 nap után;
|
||||
- el nem fogadott meghívók 30 nappal a lejáratuk után.
|
||||
- el nem fogadott „Mennyire illünk össze?” meghívók 30 nappal a lejáratuk után;
|
||||
- el nem fogadott oldalmeghívók 30 nappal a lezárásuk (lejárat vagy visszavonás) után, az elfogadottak pedig, ha a fiókot törölték.
|
||||
|
||||
**Szöveges elemzések** (`analyses`, `pending` → `running` → `done`/`failed`)
|
||||
- A backend létrehozza a `pending` sort, és levon egy elemzési egységet. Egy trigger (`NOTIFY analyses`) felébreszti a workert; egyszerre `ANALYSIS_CONCURRENCY` elemzés készül.
|
||||
|
||||
@@ -8,7 +8,7 @@ use tokio::sync::watch;
|
||||
const INTERVAL: Duration = Duration::from_secs(3600);
|
||||
|
||||
/// (what, statement) pairs; each returns the number of deleted rows.
|
||||
const STATEMENTS: [(&str, &str); 5] = [
|
||||
const STATEMENTS: [(&str, &str); 6] = [
|
||||
("sessions", "DELETE FROM sessions WHERE expires_at < now()"),
|
||||
("auth_tokens", "DELETE FROM auth_tokens WHERE expires_at < now()"),
|
||||
// Sent e-mails contain links with tokens; keep them a week for support.
|
||||
@@ -18,6 +18,13 @@ const STATEMENTS: [(&str, &str); 5] = [
|
||||
OR failed_at < now() - interval '30 days'",
|
||||
),
|
||||
("invites", "DELETE FROM synastry_invites WHERE accepted_at IS NULL AND expires_at < now() - interval '30 days'"),
|
||||
// Unused invitations 30 days after they closed; accepted ones once the account is deleted.
|
||||
(
|
||||
"invitations",
|
||||
"DELETE FROM invitations WHERE (accepted_at IS NULL \
|
||||
AND least(coalesce(revoked_at, expires_at), expires_at) < now() - interval '30 days') \
|
||||
OR (accepted_at IS NOT NULL AND accepted_by IS NULL)",
|
||||
),
|
||||
("prompt_previews", "DELETE FROM prompt_previews WHERE created_at < now() - interval '30 days'"),
|
||||
];
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use lettre::message::header::{Header, HeaderName, HeaderValue};
|
||||
use lettre::message::{Mailbox, MultiPart};
|
||||
use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};
|
||||
use serde_json::Value;
|
||||
@@ -24,7 +25,8 @@ pub enum Mailer {
|
||||
/// Collects messages instead of sending; fails for addresses listed in `fail`.
|
||||
#[cfg(test)]
|
||||
Memory {
|
||||
sent: std::sync::Mutex<Vec<(String, Rendered)>>,
|
||||
/// Recipient, rendered mail and the whole message as sent.
|
||||
sent: std::sync::Mutex<Vec<(String, Rendered, String)>>,
|
||||
fail: Vec<(String, bool)>,
|
||||
},
|
||||
}
|
||||
@@ -58,12 +60,19 @@ impl Mailer {
|
||||
Ok(Mailer::Smtp(transport))
|
||||
}
|
||||
|
||||
async fn send(&self, from: &Mailbox, to: &str, mail: &Rendered) -> Result<(), SendError> {
|
||||
async fn send(&self, id: Uuid, from: &Mailbox, to: &str, mail: &Rendered) -> Result<(), SendError> {
|
||||
let to_mailbox: Mailbox = to.parse().map_err(SendError::permanent)?;
|
||||
let message = Message::builder()
|
||||
// A Message-ID on our own domain (lettre would use the container's
|
||||
// host name, which spam filters dislike); the same on every retry.
|
||||
let mut builder = Message::builder()
|
||||
.message_id(Some(format!("<{id}@{}>", from.email.domain())))
|
||||
.from(from.clone())
|
||||
.to(to_mailbox)
|
||||
.subject(&mail.subject)
|
||||
.subject(&mail.subject);
|
||||
if let Some(url) = &mail.unsubscribe_post_url {
|
||||
builder = builder.header(ListUnsubscribe(url.clone())).header(ListUnsubscribePost);
|
||||
}
|
||||
let message = builder
|
||||
.multipart(MultiPart::alternative_plain_html(mail.text.clone(), mail.html.clone()))
|
||||
.map_err(SendError::permanent)?;
|
||||
match self {
|
||||
@@ -77,13 +86,46 @@ impl Mailer {
|
||||
if let Some((_, permanent)) = fail.iter().find(|(addr, _)| addr == to) {
|
||||
return Err(SendError { permanent: *permanent, message: "test failure".into() });
|
||||
}
|
||||
sent.lock().unwrap().push((to.to_owned(), mail.clone()));
|
||||
let raw = String::from_utf8_lossy(&message.formatted()).into_owned();
|
||||
sent.lock().unwrap().push((to.to_owned(), mail.clone(), raw));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// `List-Unsubscribe: <url>`: mail clients show an unsubscribe button.
|
||||
#[derive(Clone)]
|
||||
struct ListUnsubscribe(String);
|
||||
|
||||
impl Header for ListUnsubscribe {
|
||||
fn name() -> HeaderName {
|
||||
HeaderName::new_from_ascii_str("List-Unsubscribe")
|
||||
}
|
||||
fn parse(s: &str) -> Result<Self, Box<dyn std::error::Error + Send + Sync>> {
|
||||
Ok(Self(s.trim().trim_start_matches('<').trim_end_matches('>').to_owned()))
|
||||
}
|
||||
fn display(&self) -> HeaderValue {
|
||||
HeaderValue::new(Self::name(), format!("<{}>", self.0))
|
||||
}
|
||||
}
|
||||
|
||||
/// `List-Unsubscribe-Post`: the button unsubscribes with one POST (RFC 8058).
|
||||
#[derive(Clone)]
|
||||
struct ListUnsubscribePost;
|
||||
|
||||
impl Header for ListUnsubscribePost {
|
||||
fn name() -> HeaderName {
|
||||
HeaderName::new_from_ascii_str("List-Unsubscribe-Post")
|
||||
}
|
||||
fn parse(_: &str) -> Result<Self, Box<dyn std::error::Error + Send + Sync>> {
|
||||
Ok(Self)
|
||||
}
|
||||
fn display(&self) -> HeaderValue {
|
||||
HeaderValue::new(Self::name(), "List-Unsubscribe=One-Click".into())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Delivery {
|
||||
pub db: PgPool,
|
||||
pub mailer: Mailer,
|
||||
@@ -127,7 +169,7 @@ impl Delivery {
|
||||
for row in &rows {
|
||||
let attempts = row.attempts + 1;
|
||||
let result = match templates::render(&row.template, &row.locale, &row.payload) {
|
||||
Ok(mail) => self.mailer.send(&self.from, &row.to_email, &mail).await,
|
||||
Ok(mail) => self.mailer.send(row.id, &self.from, &row.to_email, &mail).await,
|
||||
Err(e) => Err(SendError::permanent(e)),
|
||||
};
|
||||
match result {
|
||||
|
||||
@@ -15,7 +15,9 @@ mod cleanup;
|
||||
mod compare;
|
||||
mod config;
|
||||
mod email;
|
||||
mod templates;
|
||||
mod templates {
|
||||
pub use email_templates::*;
|
||||
}
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
//! E-mail texts (Hungarian and English), as plain text and HTML.
|
||||
//!
|
||||
//! The payloads are written by the backend (`queue_email`); the validity
|
||||
//! periods in the texts match the token lifetimes there.
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Rendered {
|
||||
pub subject: String,
|
||||
pub text: String,
|
||||
pub html: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum TemplateError {
|
||||
UnknownTemplate(String),
|
||||
MissingField(&'static str),
|
||||
}
|
||||
|
||||
impl std::fmt::Display for TemplateError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
TemplateError::UnknownTemplate(t) => write!(f, "unknown e-mail template '{t}'"),
|
||||
TemplateError::MissingField(field) => write!(f, "e-mail payload has no '{field}'"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
enum Lang {
|
||||
Hu,
|
||||
En,
|
||||
}
|
||||
|
||||
/// One e-mail: greeting, paragraphs, a button and a closing note.
|
||||
struct Content {
|
||||
subject: String,
|
||||
greeting: String,
|
||||
intro: String,
|
||||
button: &'static str,
|
||||
url: String,
|
||||
note: &'static str,
|
||||
}
|
||||
|
||||
pub fn render(template: &str, locale: &str, payload: &Value) -> Result<Rendered, TemplateError> {
|
||||
let lang = if locale.eq_ignore_ascii_case("hu") { Lang::Hu } else { Lang::En };
|
||||
let url = payload["url"].as_str().filter(|u| !u.is_empty()).ok_or(TemplateError::MissingField("url"))?.to_owned();
|
||||
let greeting = |name: Option<String>| match (lang, name) {
|
||||
(Lang::Hu, Some(n)) => format!("Szia {n}!"),
|
||||
(Lang::Hu, None) => "Szia!".to_owned(),
|
||||
(Lang::En, Some(n)) => format!("Hi {n},"),
|
||||
(Lang::En, None) => "Hi,".to_owned(),
|
||||
};
|
||||
let content = match (template, lang) {
|
||||
("verify_email", Lang::Hu) => Content {
|
||||
subject: "Erősítsd meg az e-mail-címed".into(),
|
||||
greeting: greeting(name(payload, "display_name")),
|
||||
intro: "Köszönjük, hogy regisztráltál a Sorsfonalakon! Az alábbi gombbal erősítsd meg az e-mail-címed."
|
||||
.into(),
|
||||
button: "E-mail-cím megerősítése",
|
||||
url,
|
||||
note: "A link 3 napig érvényes. Ha nem te regisztráltál, nyugodtan hagyd figyelmen kívül ezt a levelet.",
|
||||
},
|
||||
("verify_email", Lang::En) => Content {
|
||||
subject: "Confirm your e-mail address".into(),
|
||||
greeting: greeting(name(payload, "display_name")),
|
||||
intro: "Thanks for signing up for Sorsfonalak! Please confirm your e-mail address with the button below."
|
||||
.into(),
|
||||
button: "Confirm e-mail address",
|
||||
url,
|
||||
note: "The link is valid for 3 days. If you did not sign up, you can safely ignore this e-mail.",
|
||||
},
|
||||
("reset_password", Lang::Hu) => Content {
|
||||
subject: "Új jelszó megadása".into(),
|
||||
greeting: greeting(name(payload, "display_name")),
|
||||
intro: "Jelszó-visszaállítást kértél a Sorsfonalak-fiókodhoz. Az alábbi gombbal adhatsz meg új jelszót."
|
||||
.into(),
|
||||
button: "Új jelszó megadása",
|
||||
url,
|
||||
note: "A link 1 óráig érvényes, és csak egyszer használható. Ha nem te kérted, hagyd figyelmen kívül ezt a levelet: a jelszavad nem változik.",
|
||||
},
|
||||
("reset_password", Lang::En) => Content {
|
||||
subject: "Set a new password".into(),
|
||||
greeting: greeting(name(payload, "display_name")),
|
||||
intro:
|
||||
"You asked to reset the password of your Sorsfonalak account. Use the button below to set a new one."
|
||||
.into(),
|
||||
button: "Set a new password",
|
||||
url,
|
||||
note: "The link is valid for 1 hour and can be used once. If you did not ask for this, ignore this e-mail: your password stays the same.",
|
||||
},
|
||||
("invite_accepted", Lang::Hu) => {
|
||||
let who = name(payload, "invitee_name");
|
||||
Content {
|
||||
subject: match &who {
|
||||
Some(n) => format!("{n} elfogadta a meghívásod"),
|
||||
None => "Elfogadták a meghívásod".into(),
|
||||
},
|
||||
greeting: greeting(None),
|
||||
intro: format!(
|
||||
"{} elfogadta a „Mennyire illünk össze?” meghívásod, és elkészült a szinasztriátok.",
|
||||
who.as_deref().unwrap_or("A meghívott")
|
||||
),
|
||||
button: "Szinasztria megnyitása",
|
||||
url,
|
||||
note: "A szinasztriát mindketten látjátok, de egymás születési adatait nem.",
|
||||
}
|
||||
}
|
||||
("invite_accepted", Lang::En) => {
|
||||
let who = name(payload, "invitee_name");
|
||||
Content {
|
||||
subject: match &who {
|
||||
Some(n) => format!("{n} accepted your invitation"),
|
||||
None => "Your invitation was accepted".into(),
|
||||
},
|
||||
greeting: greeting(None),
|
||||
intro: format!(
|
||||
"{} accepted your “How compatible are we?” invitation, and your synastry is ready.",
|
||||
who.as_deref().unwrap_or("Your invitee")
|
||||
),
|
||||
button: "Open synastry",
|
||||
url,
|
||||
note: "You both see the synastry, but not each other's birth data.",
|
||||
}
|
||||
}
|
||||
_ => return Err(TemplateError::UnknownTemplate(template.to_owned())),
|
||||
};
|
||||
Ok(content.render(lang))
|
||||
}
|
||||
|
||||
/// A user-supplied name, safe for a subject line.
|
||||
fn name(payload: &Value, field: &str) -> Option<String> {
|
||||
let name: String = payload[field].as_str()?.chars().filter(|c| !c.is_control()).take(60).collect();
|
||||
let name = name.trim();
|
||||
(!name.is_empty()).then(|| name.to_owned())
|
||||
}
|
||||
|
||||
fn escape(s: &str) -> String {
|
||||
let mut out = String::with_capacity(s.len());
|
||||
for c in s.chars() {
|
||||
match c {
|
||||
'&' => out.push_str("&"),
|
||||
'<' => out.push_str("<"),
|
||||
'>' => out.push_str(">"),
|
||||
'"' => out.push_str("""),
|
||||
'\'' => out.push_str("'"),
|
||||
_ => out.push(c),
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
impl Content {
|
||||
fn render(self, lang: Lang) -> Rendered {
|
||||
let footer = match lang {
|
||||
Lang::Hu => "Ezt a levelet a Sorsfonalak küldte.",
|
||||
Lang::En => "This e-mail was sent by Sorsfonalak.",
|
||||
};
|
||||
let text = format!(
|
||||
"{}\n\n{}\n\n{}:\n{}\n\n{}\n\n-- \nSorsfonalak\n",
|
||||
self.greeting, self.intro, self.button, self.url, self.note
|
||||
);
|
||||
let html = format!(
|
||||
r#"<!doctype html>
|
||||
<html lang="{lang}">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>{subject}</title></head>
|
||||
<body style="margin:0;padding:0;background:#f4f1ea;font-family:Georgia,'Times New Roman',serif;color:#2a2620">
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f4f1ea;padding:32px 16px">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width:520px;background:#ffffff;border-radius:8px;padding:32px">
|
||||
<tr><td style="font-size:20px;letter-spacing:2px;color:#9a7b3c;padding-bottom:24px">SORSFONALAK</td></tr>
|
||||
<tr><td style="font-size:16px;line-height:1.6;padding-bottom:12px">{greeting}</td></tr>
|
||||
<tr><td style="font-size:16px;line-height:1.6;padding-bottom:24px">{intro}</td></tr>
|
||||
<tr><td style="padding-bottom:24px"><a href="{url}" style="display:inline-block;background:#9a7b3c;color:#ffffff;text-decoration:none;padding:12px 24px;border-radius:6px;font-size:16px">{button}</a></td></tr>
|
||||
<tr><td style="font-size:14px;line-height:1.6;color:#6b645a;padding-bottom:16px">{note}</td></tr>
|
||||
<tr><td style="font-size:12px;line-height:1.5;color:#9b948a;word-break:break-all">{url_text}</td></tr>
|
||||
</table>
|
||||
<p style="font-size:12px;color:#9b948a;max-width:520px">{footer}</p>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
"#,
|
||||
lang = if lang == Lang::Hu { "hu" } else { "en" },
|
||||
subject = escape(&self.subject),
|
||||
greeting = escape(&self.greeting),
|
||||
intro = escape(&self.intro),
|
||||
url = escape(&self.url),
|
||||
button = escape(self.button),
|
||||
note = escape(self.note),
|
||||
url_text = escape(&self.url),
|
||||
footer = escape(footer),
|
||||
);
|
||||
Rendered { subject: self.subject, text, html }
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ fn delivery(db: PgPool, fail: Vec<(&str, bool)>) -> Delivery {
|
||||
|
||||
fn sent(d: &Delivery) -> Vec<(String, String)> {
|
||||
let Mailer::Memory { sent, .. } = &d.mailer else { unreachable!() };
|
||||
sent.lock().unwrap().iter().map(|(to, m)| (to.clone(), m.subject.clone())).collect()
|
||||
sent.lock().unwrap().iter().map(|(to, m, _)| (to.clone(), m.subject.clone())).collect()
|
||||
}
|
||||
|
||||
async fn queue(db: &PgPool, to: &str, template: &str) -> Uuid {
|
||||
@@ -123,6 +123,35 @@ async fn delivers_retries_and_gives_up(db: PgPool) {
|
||||
assert_eq!(sent(&d).len(), 1);
|
||||
}
|
||||
|
||||
#[sqlx::test(migrator = "db::MIGRATOR")]
|
||||
async fn invitation_headers_for_spam_filters(db: PgPool) {
|
||||
let id = Uuid::now_v7();
|
||||
sqlx::query(
|
||||
"INSERT INTO email_outbox (id, to_email, template, locale, payload) VALUES ($1, $2, 'invitation', 'hu', $3)",
|
||||
)
|
||||
.bind(id)
|
||||
.bind("guest@example.com")
|
||||
.bind(json!({
|
||||
"url": "https://example.com/meghivo/t",
|
||||
"inviter_name": "Kata",
|
||||
"message": null,
|
||||
"expires_on": "2026-12-17",
|
||||
"unsubscribe_url": "https://example.com/leiratkozas?token=t",
|
||||
"unsubscribe_post_url": "https://example.com/api/v1/public/invitations/unsubscribe?token=t",
|
||||
}))
|
||||
.execute(&db)
|
||||
.await
|
||||
.unwrap();
|
||||
let d = delivery(db.clone(), vec![]);
|
||||
assert_eq!(d.deliver_due().await.unwrap(), 1);
|
||||
let Mailer::Memory { sent, .. } = &d.mailer else { unreachable!() };
|
||||
let raw = sent.lock().unwrap()[0].2.clone();
|
||||
assert!(raw.contains(&format!("Message-ID: <{id}@example.com>")), "{raw}");
|
||||
assert!(raw.contains("List-Unsubscribe: <https://example.com/api/v1/public/invitations/unsubscribe?token=t>"));
|
||||
assert!(raw.contains("List-Unsubscribe-Post: List-Unsubscribe=One-Click"));
|
||||
assert!(raw.contains("multipart/alternative") && raw.contains("text/plain") && raw.contains("text/html"));
|
||||
}
|
||||
|
||||
#[sqlx::test(migrator = "db::MIGRATOR")]
|
||||
async fn concurrent_workers_do_not_send_twice(db: PgPool) {
|
||||
for i in 0..15 {
|
||||
@@ -177,7 +206,14 @@ async fn cleanup_removes_only_expired_data(db: PgPool) {
|
||||
let deleted = crate::cleanup::run_once(&db).await.unwrap();
|
||||
assert_eq!(
|
||||
deleted,
|
||||
vec![("sessions", 1), ("auth_tokens", 0), ("emails", 1), ("invites", 0), ("prompt_previews", 0)]
|
||||
vec![
|
||||
("sessions", 1),
|
||||
("auth_tokens", 0),
|
||||
("emails", 1),
|
||||
("invites", 0),
|
||||
("invitations", 0),
|
||||
("prompt_previews", 0)
|
||||
]
|
||||
);
|
||||
let (left,): (Vec<Uuid>,) =
|
||||
sqlx::query_as("SELECT array_agg(id ORDER BY id) FROM email_outbox").fetch_one(&db).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user