mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +00:00
event: don't let --outbox relays accumulated for one stdin event leak into the next ones.
This commit is contained in:
@@ -185,7 +185,7 @@ example:
|
|||||||
),
|
),
|
||||||
ArgsUsage: "[relay...]",
|
ArgsUsage: "[relay...]",
|
||||||
Action: func(ctx context.Context, c *cli.Command) error {
|
Action: func(ctx context.Context, c *cli.Command) error {
|
||||||
relayUrls := c.Args().Slice()
|
argRelayUrls := c.Args().Slice()
|
||||||
|
|
||||||
kr, sec, err := gatherKeyerFromArguments(ctx, c)
|
kr, sec, err := gatherKeyerFromArguments(ctx, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -383,6 +383,9 @@ example:
|
|||||||
}
|
}
|
||||||
|
|
||||||
var relays []*nostr.Relay
|
var relays []*nostr.Relay
|
||||||
|
// start from the given relays on every event so --outbox additions
|
||||||
|
// for one event don't leak into the next
|
||||||
|
relayUrls := slices.Clone(argRelayUrls)
|
||||||
if len(relayUrls) > 0 || c.Bool("outbox") {
|
if len(relayUrls) > 0 || c.Bool("outbox") {
|
||||||
if c.Bool("outbox") {
|
if c.Bool("outbox") {
|
||||||
if evt.PubKey != nostr.ZeroPK {
|
if evt.PubKey != nostr.ZeroPK {
|
||||||
|
|||||||
Reference in New Issue
Block a user