mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-02 08:19:14 +02:00
sessions: switch to settings struct.
This commit is contained in:
parent
d004ddd68f
commit
81867d811b
9 changed files with 113 additions and 80 deletions
|
@ -40,7 +40,7 @@ func (h *MessageHandlerCtx) controlRequest(session types.Session) error {
|
|||
return ErrIsAlreadyTheHost
|
||||
}
|
||||
|
||||
if !h.sessions.ImplicitHosting() {
|
||||
if !h.sessions.Settings().ImplicitHosting {
|
||||
// tell session if there is a host
|
||||
if host := h.sessions.GetHost(); host != nil {
|
||||
session.Send(
|
||||
|
|
|
@ -44,12 +44,15 @@ func (h *MessageHandlerCtx) systemInit(session types.Session) error {
|
|||
ControlHost: controlHost,
|
||||
ScreenSize: message.ScreenSize(*size),
|
||||
Sessions: sessions,
|
||||
ImplicitHosting: h.sessions.ImplicitHosting(),
|
||||
InactiveCursors: h.sessions.InactiveCursors(),
|
||||
Settings: h.sessions.Settings(),
|
||||
ScreencastEnabled: h.capture.Screencast().Enabled(),
|
||||
WebRTC: message.SystemWebRTC{
|
||||
Videos: h.capture.VideoIDs(),
|
||||
},
|
||||
|
||||
// TODO: Left for compatibility with old client, remove.
|
||||
ImplicitHosting: h.sessions.Settings().ImplicitHosting,
|
||||
InactiveCursors: h.sessions.Settings().InactiveCursors,
|
||||
})
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue