]> git.giacomolli.uk - onechat/blobdiff - socket.go
Send stored images to WhatsApp chats
[onechat] / socket.go
index a454728b1ba347d845454788a02f85b56874843b..0dffeb088c4c61013cf690c8b2188a0446ad6a5b 100644 (file)
--- a/socket.go
+++ b/socket.go
@@ -30,8 +30,13 @@ func checkSocketPath(path string) error {
 }
 
 // SocketRequest is one line from a client: "send" with the text of a user
-// message, or "interrupt".
+// message, "interrupt", "stop" with the name of a subagent in Text, or
+// "whatsapp" with the text after /whatsapp of a WhatsApp command, or "backup"
+// with the absolute output path in Text. The backup answer is a "backup" event
+// with the path and size, or an "error" event. An "image" request has an
+// absolute Path and the caption in Text.
 type SocketRequest struct {
        Type string `json:"type"`
        Text string `json:"text,omitempty"`
+       Path string `json:"path,omitempty"`
 }