mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-01 11:26:21 +02:00
16 lines
366 B
Go
16 lines
366 B
Go
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
|
|
}
|