From 7360cd115ead5d3419f17ca72f55fa14f445c5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 5 Jun 2024 11:23:41 +0200 Subject: [PATCH] fix: use correct name during init and use app name as provider --- ocis/pkg/init/init.go | 2 +- services/collaboration/pkg/config/app.go | 2 +- services/collaboration/pkg/connector/fileconnector.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ocis/pkg/init/init.go b/ocis/pkg/init/init.go index b3c1f0b63..74a9695b1 100644 --- a/ocis/pkg/init/init.go +++ b/ocis/pkg/init/init.go @@ -162,7 +162,7 @@ type WopiApp struct { } type Collaboration struct { - WopiApp WopiApp `yaml:"wopiapp"` + WopiApp WopiApp `yaml:"wopi"` } type Nats struct { diff --git a/services/collaboration/pkg/config/app.go b/services/collaboration/pkg/config/app.go index 36eecc507..f54d058f6 100644 --- a/services/collaboration/pkg/config/app.go +++ b/services/collaboration/pkg/config/app.go @@ -2,7 +2,7 @@ package config // App defines the available app configuration. type App struct { - Name string `yaml:"name" env:"COLLABORATION_APP_NAME" desc:"The name of the app" introductionVersion:"6.0.0"` + Name string `yaml:"name" env:"COLLABORATION_APP_NAME" desc:"The name of the app, either Collabora, OnlyOffice or Microsoft365" introductionVersion:"6.0.0"` Description string `yaml:"description" env:"COLLABORATION_APP_DESCRIPTION" desc:"App description" introductionVersion:"6.0.0"` Icon string `yaml:"icon" env:"COLLABORATION_APP_ICON" desc:"Icon for the app" introductionVersion:"6.0.0"` LockName string `yaml:"lockname" env:"COLLABORATION_APP_LOCKNAME" desc:"Name for the app lock" introductionVersion:"6.0.0"` diff --git a/services/collaboration/pkg/connector/fileconnector.go b/services/collaboration/pkg/connector/fileconnector.go index b08718bc4..bd77eef5e 100644 --- a/services/collaboration/pkg/connector/fileconnector.go +++ b/services/collaboration/pkg/connector/fileconnector.go @@ -501,7 +501,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (fileinfo.FileInfo, e } var info fileinfo.FileInfo - switch strings.ToLower(f.cfg.WopiApp.Provider) { + switch strings.ToLower(f.cfg.App.Name) { case "collabora": info = &fileinfo.Collabora{} case "onlyoffice":