X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/697c662a48c87ee9be136358129c1f79f4f5a72f..b2873a2a0bf8b0ba648aebac51759e5fed89a2e2:/daemon.go?ds=sidebyside diff --git a/daemon.go b/daemon.go index 58bf502..68073d0 100644 --- a/daemon.go +++ b/daemon.go @@ -34,6 +34,10 @@ const ( // socketPathBytes is the longest path of a Unix socket on Linux. socketPathBytes = 107 + + // terminalSource is the source of the user messages from the clients of + // the socket. + terminalSource = "terminal" ) // errTokensInUse tells that another onechat process uses the token file. @@ -305,7 +309,7 @@ func runRequest(l *loop, request clientRequest) error { return errors.New("empty message") } - _, err := l.Submit(request.Text) + _, err := l.Submit(terminalSource, request.Text) return err case "interrupt":