mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-19 00:57:37 +01:00
user: fix welcome message sent value on NewUserFromAdmin
inverted since WelcomeNewUser returns a bool called "failed", rather than one indicating success.
This commit is contained in:
@@ -63,7 +63,7 @@ func (app *appContext) NewUserFromAdmin(gc *gin.Context) {
|
||||
|
||||
welcomeMessageSentIfNecessary := true
|
||||
if nu.Created {
|
||||
welcomeMessageSentIfNecessary = app.WelcomeNewUser(nu.User, time.Time{})
|
||||
welcomeMessageSentIfNecessary = !app.WelcomeNewUser(nu.User, time.Time{})
|
||||
}
|
||||
|
||||
respondUser(nu.Status, nu.Created, welcomeMessageSentIfNecessary, nu.Message, gc)
|
||||
|
||||
Reference in New Issue
Block a user