fix: get email texts with default language (#1238)

This commit is contained in:
Fabi
2021-02-04 12:00:48 +01:00
committed by GitHub
parent 4b9afc43e2
commit a69f7d69d5
4 changed files with 50 additions and 14 deletions

View File

@@ -39,6 +39,7 @@ type NotifyUser struct {
VerifiedPhone string `json:"-" gorm:"column:verified_phone"`
PasswordSet bool `json:"-" gorm:"column:password_set"`
Sequence uint64 `json:"-" gorm:"column:sequence"`
State int32 `json:"-" gorm:"-"`
}
func NotifyUserFromModel(user *model.NotifyUser) *NotifyUser {
@@ -144,6 +145,8 @@ func (u *NotifyUser) AppendEvent(event *models.Event) (err error) {
case es_model.UserPasswordChanged,
es_model.HumanPasswordChanged:
err = u.setPasswordData(event)
case es_model.UserRemoved:
u.State = int32(UserStateDeleted)
}
return err
}