]> git.giacomolli.uk - onechat/blobdiff - daemon.go
Show the user messages of the other clients
[onechat] / daemon.go
index 58bf502b5bba1b31d226f9439ac9038310a253ad..68073d0be5342b81eb0dc93203226cb0ee063954 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -34,6 +34,10 @@ const (
 
        // socketPathBytes is the longest path of a Unix socket on Linux.
        socketPathBytes = 107
 
        // 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.
 )
 
 // 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")
                }
 
                        return errors.New("empty message")
                }
 
-               _, err := l.Submit(request.Text)
+               _, err := l.Submit(terminalSource, request.Text)
 
                return err
        case "interrupt":
 
                return err
        case "interrupt":