From 2f2840488818033261cb1fc82e65d24ac4c4924b Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 8 Oct 2026 16:41:36 +0200 Subject: [PATCH] Say a channel's failure, its standing, and what a message replies to --- go/asks/asks.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/go/asks/asks.go b/go/asks/asks.go index 90be5cf..b96967f 100644 --- a/go/asks/asks.go +++ b/go/asks/asks.go @@ -308,6 +308,8 @@ type Message struct { Buttons []Button `json:"buttons,omitempty"` Urgent bool `json:"urgent,omitempty"` Silent bool `json:"silent,omitempty"` + // Reply is the Choice or LinkAsked this answers, by its ID: the channel shows it where that was made. + Reply string `json:"reply,omitempty"` } // Sender is who a channel's service says sent something: the account, the name it shows, and whether the @@ -318,6 +320,29 @@ type Sender struct { Authenticated bool `json:"authenticated"` } +// Failed is a message a channel could not deliver: its handle, why, and whether trying again could help. +type Failed struct { + Handle string `json:"handle"` + Why string `json:"why"` + Permanent bool `json:"permanent,omitempty"` + At time.Time `json:"at"` +} + +// Standing is what a channel says of itself, at least every five minutes and whenever it changes: +// whether it can send now, why not, and whether its edits notify nobody. +type Standing struct { + Ready bool `json:"ready"` + Why string `json:"why,omitempty"` + EditsSilently bool `json:"edits-silently,omitempty"` + At time.Time `json:"at"` +} + +// What a channel says of its own delivery, on IntakeSubject. +const ( + FailedWhat = "failed" + StandingWhat = "standing" +) + // Choice is a button chosen on a channel. type Choice struct { // ID is the channel's own for this arrival, unique, so the router acts on it once.