fix(messages): don't send notification to sender of message
Build and Push Docker image / build-and-push (push) Successful in 2m0s
Details
Build and Push Docker image / build-and-push (push) Successful in 2m0s
Details
This commit is contained in:
parent
94f1d4c586
commit
a95ad8a702
|
@ -14,6 +14,11 @@ import (
|
|||
|
||||
// sendEmailNotification sends an email notification to the user
|
||||
func sendEmailNotification(app *pocketbase.PocketBase, registry *template.Registry, user *models.Record, message *models.Record) {
|
||||
// check if user and message are set and user is not the sender
|
||||
if user == nil || message == nil || user.GetId() == message.GetString("sender") {
|
||||
return
|
||||
}
|
||||
|
||||
userEmail := user.GetString("email")
|
||||
|
||||
// check if user has a valid email
|
||||
|
|
Loading…
Reference in New Issue