mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-24 05:28:07 +02:00
Implicit control gain (#108)
* add client side implicit hosting. * add server side implicit hosting. * update changelog. * allow clipboard & keybaord access.
This commit is contained in:
parent
f08ed0fc28
commit
7d1fa28d88
21 changed files with 125 additions and 38 deletions
|
@ -25,6 +25,11 @@ func (h *MessageHandler) adminLock(id string, session types.Session, payload *me
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO: Handle locks in sessions as flags.
|
||||
if payload.Resource == "control" {
|
||||
h.sessions.SetControlLocked(true)
|
||||
}
|
||||
|
||||
h.locked[payload.Resource] = id
|
||||
|
||||
if err := h.sessions.Broadcast(
|
||||
|
@ -52,6 +57,11 @@ func (h *MessageHandler) adminUnlock(id string, session types.Session, payload *
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO: Handle locks in sessions as flags.
|
||||
if payload.Resource == "control" {
|
||||
h.sessions.SetControlLocked(false)
|
||||
}
|
||||
|
||||
delete(h.locked, payload.Resource)
|
||||
|
||||
if err := h.sessions.Broadcast(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue