fixed the notification service error when the user's display name contained special characters

This commit is contained in:
Roman Perekhod
2024-06-25 17:51:51 +02:00
parent eb5a9ceade
commit f29b254333
8 changed files with 113 additions and 16 deletions
+6 -6
View File
@@ -19,6 +19,7 @@ import (
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
"github.com/mohae/deepcopy"
"github.com/olekukonko/tablewriter"
notifications "github.com/owncloud/ocis/v2/services/notifications/pkg/command"
"github.com/thejerf/suture/v4"
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
@@ -43,7 +44,6 @@ import (
idp "github.com/owncloud/ocis/v2/services/idp/pkg/command"
invitations "github.com/owncloud/ocis/v2/services/invitations/pkg/command"
nats "github.com/owncloud/ocis/v2/services/nats/pkg/command"
notifications "github.com/owncloud/ocis/v2/services/notifications/pkg/command"
ocdav "github.com/owncloud/ocis/v2/services/ocdav/pkg/command"
ocm "github.com/owncloud/ocis/v2/services/ocm/pkg/command"
ocs "github.com/owncloud/ocis/v2/services/ocs/pkg/command"
@@ -200,11 +200,6 @@ func NewService(options ...Option) (*Service, error) {
cfg.IDM.Commons = cfg.Commons
return idm.Execute(cfg.IDM)
})
reg(3, opts.Config.Notifications.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
cfg.Notifications.Context = ctx
cfg.Notifications.Commons = cfg.Commons
return notifications.Execute(cfg.Notifications)
})
reg(3, opts.Config.OCDav.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
cfg.OCDav.Context = ctx
cfg.OCDav.Commons = cfg.Commons
@@ -339,6 +334,11 @@ func NewService(options ...Option) (*Service, error) {
cfg.Invitations.Commons = cfg.Commons
return invitations.Execute(cfg.Invitations)
})
areg(opts.Config.Notifications.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
cfg.Notifications.Context = ctx
cfg.Notifications.Commons = cfg.Commons
return notifications.Execute(cfg.Notifications)
})
return s, nil
}