- Added support for Faster Whisper transcription via Jigasi and Skynet. - Updated .env.example to include new environment variables for transcription settings. - Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services. - Introduced new API endpoints for managing organizational folders in the drive service. - Updated Nextcloud initialization script to enable external file mounting. - Improved error handling and response structures in the drive API. - Added new properties for organization settings related to transcription and agenda management.
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
package drive
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ultisuite/ulti-backend/internal/driveroot"
|
|
"github.com/ultisuite/ulti-backend/internal/nextcloud"
|
|
)
|
|
|
|
func (s *Service) CreateShareAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref, req createShareRequest, permissions int) (*nextcloud.ShareInfo, error) {
|
|
if usesAlternateRoot(ref) {
|
|
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return s.CreateShare(ctx, ncUserID, file.Path, req, permissions)
|
|
}
|
|
return s.CreateShare(ctx, ncUserID, ref.Path, req, permissions)
|
|
}
|
|
|
|
func (s *Service) SetFavoriteAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref, favorite bool) error {
|
|
if usesAlternateRoot(ref) {
|
|
// Favorites are only supported on personal NC file paths today.
|
|
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return s.SetFavorite(ctx, ncUserID, file.Path, favorite)
|
|
}
|
|
return s.SetFavorite(ctx, ncUserID, ref.Path, favorite)
|
|
}
|
|
|
|
func (s *Service) ListSharesAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref) ([]nextcloud.ShareInfo, error) {
|
|
if usesAlternateRoot(ref) {
|
|
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return s.ListShares(ctx, ncUserID, file.Path)
|
|
}
|
|
return s.ListShares(ctx, ncUserID, ref.Path)
|
|
}
|