mirror of
https://github.com/fiatjaf/nak.git
synced 2026-07-30 19:36:15 +00:00
event: exit with error when all the publishes fail.
This commit is contained in:
@@ -588,6 +588,10 @@ func publishFlow(ctx context.Context, c *cli.Command, kr nostr.Signer, evt nostr
|
|||||||
if len(successRelays) > 0 && c.Bool("nevent") {
|
if len(successRelays) > 0 && c.Bool("nevent") {
|
||||||
log(nip19.EncodeNevent(evt.ID, successRelays, evt.PubKey) + "\n")
|
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
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user