X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/f5c601f1801aaa276f8c335fcb51c373edc0b50c..9346d20fe4297dce1aa16171749a7ef3e41ce7bd:/socket.go?ds=inline diff --git a/socket.go b/socket.go index f87bec7..dc78d94 100644 --- a/socket.go +++ b/socket.go @@ -25,11 +25,15 @@ 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 optional agent_id selects a permanent identity, not a name. +// 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.