fix(logintexts): fix several custom text attributes for get and set (#4733)

* fix(logintexts): fix several custom text attributes for get and set

* fix(logintexts): fix externalUserNotFound attribute for json unmarshalling and reduce for customTexts

* fix: correct imports for linting
This commit is contained in:
Stefan Benz
2022-12-01 12:31:46 +00:00
committed by GitHub
parent 9fbd1034c2
commit 9626897834
10 changed files with 88 additions and 32 deletions

View File

@@ -54,7 +54,7 @@ func (wm *CustomMessageTextReadModel) Reduce() error {
}
wm.State = domain.PolicyStateActive
case *policy.CustomTextRemovedEvent:
if e.Key != wm.MessageTextType || wm.Language != e.Language {
if e.Template != wm.MessageTextType || wm.Language != e.Language {
continue
}
if e.Key == domain.MessageSubject {
@@ -79,7 +79,7 @@ func (wm *CustomMessageTextReadModel) Reduce() error {
wm.FooterText = ""
}
case *policy.CustomTextTemplateRemovedEvent:
if wm.Language != e.Language {
if e.Template != wm.MessageTextType || wm.Language != e.Language {
continue
}
wm.Subject = ""