legacy hack: file transfer enabled in init.

This commit is contained in:
Miroslav Šedivý 2024-09-07 21:57:04 +02:00
parent 6aac5da08c
commit 136d2ba1da

View file

@ -6,6 +6,7 @@ import (
"fmt"
"github.com/pion/webrtc/v3"
"github.com/spf13/viper"
oldEvent "m1k1o/neko/internal/http/legacy/event"
oldMessage "m1k1o/neko/internal/http/legacy/message"
@ -252,7 +253,8 @@ func (s *session) wsToClient(msg []byte) error {
Event: oldEvent.SYSTEM_INIT,
ImplicitHosting: request.Settings.ImplicitHosting,
Locks: locks,
FileTransfer: true, // TODO: We don't know if file transfer is enabled, we would need to check the global config somehow.
// TODO: hack - we don't know if file transfer is enabled, we would need to check the global config.
FileTransfer: viper.GetBool("filetransfer.enabled") || (viper.GetBool("legacy") && viper.GetBool("file_transfer_enabled")),
})
case event.SYSTEM_ADMIN: