fix: reset custom org domain policy (#4014)

This commit is contained in:
Livio Spring
2022-07-21 13:46:59 +02:00
committed by GitHub
parent 6a3689e05a
commit 91206967b4
4 changed files with 30 additions and 10 deletions

View File

@@ -33,6 +33,8 @@ func (wm *PolicyDomainWriteModel) Reduce() error {
if e.SMTPSenderAddressMatchesInstanceDomain != nil {
wm.SMTPSenderAddressMatchesInstanceDomain = *e.SMTPSenderAddressMatchesInstanceDomain
}
case *policy.DomainPolicyRemovedEvent:
wm.State = domain.PolicyStateRemoved
}
}
return wm.WriteModel.Reduce()