]> git.giacomolli.uk - onechat/blobdiff - socket.go
Submit root events through the local socket
[onechat] / socket.go
index f87bec70ad5fca67fe1bce47e21cfc9d5bcb7c6f..1205d8c69a1ad4a51da6f15971dc675f0356072e 100644 (file)
--- a/socket.go
+++ b/socket.go
@@ -25,11 +25,14 @@ const (
 // "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.
+// absolute Path and the caption in Text. A "notify" request has external data
+// in Notify. Its private "notify" answer has a queue ID and an accepted or
+// duplicate Status, not a processing result.
 type SocketRequest struct {
-       Type string `json:"type"`
-       Text string `json:"text,omitempty"`
-       Path string `json:"path,omitempty"`
+       Type   string       `json:"type"`
+       Text   string       `json:"text,omitempty"`
+       Path   string       `json:"path,omitempty"`
+       Notify *NotifyInput `json:"notify,omitempty"`
 }
 
 // checkSocketPath makes sure that path fits in the address of a Unix socket.