introduce message prototypes

This introduces message prototypes to applicable API endpoints, which
allows us to invert control of message sending and give the user a
chance to intervene with an interactive ui.

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
vyzo
2021-05-07 15:30:05 +02:00
committed by Jakub Sztandera
parent 86e90dc6f1
commit e2d0047a2a
20 changed files with 852 additions and 323 deletions
+2 -2
View File
@@ -147,12 +147,12 @@ var sendCmd = &cli.Command{
}
msg, checks, err := srv.PublishMessage(ctx, proto, cctx.Bool("force"))
if xerrors.Is(err, ErrCheckFailed) {
proto, err = resolveChecks(ctx, srv, cctx.App.Writer, proto, checks, true)
proto, err := resolveChecks(ctx, srv, cctx.App.Writer, proto, checks, true)
if err != nil {
return xerrors.Errorf("from UI: %w", err)
}
msg, _, err = srv.PublishMessage(ctx, proto, true)
msg, _, err = srv.PublishMessage(ctx, proto, true) //nolint
}
if err != nil {