From de9f88bf5b57de791f1e1b285e41176a6ae96b32 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Thu, 29 Jul 2021 14:29:09 +0200 Subject: [PATCH] fix: custom mail texts (#2101) * fix: custom mail texts * fix: custom mail texts * disable cache * enable cache again * disable cache again * comment --- .github/workflows/zitadel.yml | 6 +++--- .../repository/eventsourcing/handler/notification.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/zitadel.yml b/.github/workflows/zitadel.yml index e98f562e6..03290f89d 100644 --- a/.github/workflows/zitadel.yml +++ b/.github/workflows/zitadel.yml @@ -72,7 +72,7 @@ jobs: context: . file: ./build/zitadel/Dockerfile platforms: linux/amd64 - cache-from: type=gha,scope=${{ github.workflow }} +# cache-from: type=gha,scope=${{ github.workflow }} (https://github.com/caos/zitadel/issues/2102) cache-to: type=gha,scope=${{ github.workflow }},mode=max outputs: type=local,dest=/tmp/zitadel - uses: actions/upload-artifact@v2 @@ -124,7 +124,7 @@ jobs: context: . file: ./build/console/Dockerfile platforms: linux/amd64 - cache-from: type=gha,scope=${{ github.workflow }} +# cache-from: type=gha,scope=${{ github.workflow }} (https://github.com/caos/zitadel/issues/2102) cache-to: type=gha,scope=${{ github.workflow }},mode=max outputs: type=local,dest=/tmp/zitadel-console - uses: actions/upload-artifact@v2 @@ -194,7 +194,7 @@ jobs: context: . file: ./build/operator/Dockerfile platforms: linux/amd64 - cache-from: type=gha,scope=${{ matrix.goos }}-${{ matrix.goarch }} +# cache-from: type=gha,scope=${{ matrix.goos }}-${{ matrix.goarch }} (https://github.com/caos/zitadel/issues/2102) cache-to: type=gha,scope=${{ matrix.goos }}-${{ matrix.goarch }},mode=max outputs: type=local,dest=/tmp/operator build-args: | diff --git a/internal/notification/repository/eventsourcing/handler/notification.go b/internal/notification/repository/eventsourcing/handler/notification.go index 3e3520173..e260ab4d8 100644 --- a/internal/notification/repository/eventsourcing/handler/notification.go +++ b/internal/notification/repository/eventsourcing/handler/notification.go @@ -398,18 +398,18 @@ func (n *Notification) getTranslatorWithOrgTexts(orgID, textType string) (*i18n. return nil, err } allCustomTexts, err := n.view.CustomTextsByAggregateIDAndTemplate(domain.IAMID, textType) - if err == nil { + if err != nil { return translator, nil } customTexts, err := n.view.CustomTextsByAggregateIDAndTemplate(orgID, textType) - if err == nil { + if err != nil { return translator, nil } allCustomTexts = append(allCustomTexts, customTexts...) for _, text := range allCustomTexts { msg := i18n.Message{ - ID: text.Key, + ID: text.Template + "." + text.Key, Text: text.Text, } translator.AddMessages(language.Make(text.Language), msg)