send welcome mail to new members
This commit is contained in:
@ -69,6 +69,18 @@ impl Notification {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn create_for_role(
|
||||
db: &SqlitePool,
|
||||
role: &Role,
|
||||
message: &str,
|
||||
category: &str,
|
||||
link: Option<&str>,
|
||||
) {
|
||||
let mut tx = db.begin().await.unwrap();
|
||||
Self::create_for_role_tx(&mut tx, role, message, category, link).await;
|
||||
tx.commit().await.unwrap();
|
||||
}
|
||||
|
||||
pub async fn for_user(db: &SqlitePool, user: &User) -> Vec<Self> {
|
||||
let rows = sqlx::query!(
|
||||
"
|
||||
|
Reference in New Issue
Block a user