- tags
- #shop
shop-notify¶
Every message the shop sends goes through this one rule. Here it keeps the message in the shop's outbox (a Message object, see shop), so the demo shows what would go out and to whom. In your own project, this is the one place to change when you want real notices or email: add diesel.user.notify (to = "<a member's handle>", text = text) for the people who run the shop, or diesel.user.sendEmail once email is on.
$when shop.notify (to: String, text: String) {
n = dom.list(cls = "Message").total
payload = dom.upsert(cls = "Message", entity = {id: "m${n + 1}", to: to, text: text, at: now()})
}