From a3ee6f36480b829285864547411d4399df575183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sw=C3=A4rd?= Date: Fri, 16 Jun 2023 13:41:57 +0200 Subject: [PATCH] notifications: Fix nullpointer problems Closes: #6541 --- services/notifications/pkg/command/server.go | 5 +++++ services/notifications/pkg/config/config.go | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/services/notifications/pkg/command/server.go b/services/notifications/pkg/command/server.go index cfdd7a57a1..f409ce8ce2 100644 --- a/services/notifications/pkg/command/server.go +++ b/services/notifications/pkg/command/server.go @@ -40,6 +40,11 @@ func Server(cfg *config.Config) *cli.Command { Action: func(c *cli.Context) error { logger := logging.Configure(cfg.Service.Name, cfg.Log) + err := grpc.Configure(grpc.GetClientOptions(&cfg.GRPCClientTLS)...) + if err != nil { + return err + } + gr := run.Group{} ctx, cancel := func() (context.Context, context.CancelFunc) { diff --git a/services/notifications/pkg/config/config.go b/services/notifications/pkg/config/config.go index 9c0a319818..83491eeebb 100644 --- a/services/notifications/pkg/config/config.go +++ b/services/notifications/pkg/config/config.go @@ -18,7 +18,8 @@ type Config struct { WebUIURL string `yaml:"ocis_url" env:"OCIS_URL;NOTIFICATIONS_WEB_UI_URL" desc:"The public facing URL of the oCIS Web UI, used e.g. when sending notification eMails"` - Notifications Notifications `yaml:"notifications"` + Notifications Notifications `yaml:"notifications"` + GRPCClientTLS shared.GRPCClientTLS `yaml:"grpc_client_tls"` Context context.Context `yaml:"-"` }