You've already forked AstralRinth
forked from didirus/AstralRinth
New Creator Notifications (#4383)
* Some new notification types * Fix error * Use existing DB models rather than inline queries * Fix template fillout * Fix ModerationThreadMessageReceived * Insert more notifications, fix some formatting * chore: query cache, clippy, fmt * chore: query cache, clippy, fmt * Use outer transactions to insert notifications instead of creating a new one * Join futures
This commit is contained in:
committed by
GitHub
parent
8149618187
commit
6da190ed01
@@ -476,6 +476,22 @@ pub async fn project_edit(
|
||||
new_status: *status,
|
||||
},
|
||||
}
|
||||
.insert_many(notified_members.clone(), &mut transaction, &redis)
|
||||
.await?;
|
||||
|
||||
NotificationBuilder {
|
||||
body: if status.is_approved() {
|
||||
NotificationBody::ProjectStatusApproved {
|
||||
project_id: project_item.inner.id.into(),
|
||||
}
|
||||
} else {
|
||||
NotificationBody::ProjectStatusNeutral {
|
||||
project_id: project_item.inner.id.into(),
|
||||
old_status: project_item.inner.status,
|
||||
new_status: *status,
|
||||
}
|
||||
},
|
||||
}
|
||||
.insert_many(notified_members, &mut transaction, &redis)
|
||||
.await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user