mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-28 08:27:09 +02:00
update clipboard WS.
This commit is contained in:
parent
2c210f3cf1
commit
e93d167be6
6 changed files with 27 additions and 27 deletions
16
internal/websocket/handler/clipboard.go
Normal file
16
internal/websocket/handler/clipboard.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package handler
|
||||
|
||||
import (
|
||||
"demodesk/neko/internal/types"
|
||||
"demodesk/neko/internal/types/message"
|
||||
)
|
||||
|
||||
func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error {
|
||||
if !session.IsHost() {
|
||||
h.logger.Debug().Str("id", session.ID()).Msg("is not the host")
|
||||
return nil
|
||||
}
|
||||
|
||||
h.desktop.WriteClipboard(payload.Text)
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue