mirror of
https://github.com/fiatjaf/nak.git
synced 2026-07-29 07:47:42 +02:00
event: exit with error when all the publishes fail.
This commit is contained in:
4
event.go
4
event.go
@@ -588,6 +588,10 @@ func publishFlow(ctx context.Context, c *cli.Command, kr nostr.Signer, evt nostr
|
||||
if len(successRelays) > 0 && c.Bool("nevent") {
|
||||
log(nip19.EncodeNevent(evt.ID, successRelays, evt.PubKey) + "\n")
|
||||
}
|
||||
|
||||
if len(successRelays) == 0 {
|
||||
return fmt.Errorf("failed to publish to any of the relays")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user