fix: state on user projection (#3109)

* fix: state on user projection

* fix: state on user projection

* don't change user state on HumanEmailVerifiedEvent
This commit is contained in:
Livio Amstutz
2022-01-25 11:35:38 +01:00
committed by GitHub
parent 77de5bf97a
commit 542651707a
3 changed files with 173 additions and 14 deletions

View File

@@ -47,9 +47,6 @@ func (wm *HumanInitCodeWriteModel) Reduce() error {
wm.IsEmailVerified = false
case *user.HumanEmailVerifiedEvent:
wm.IsEmailVerified = true
if wm.UserState == domain.UserStateInitial {
wm.UserState = domain.UserStateActive
}
case *user.HumanInitialCodeAddedEvent:
wm.Code = e.Code
wm.CodeCreationDate = e.CreationDate()