mirror of
https://github.com/fiatjaf/nak.git
synced 2026-08-02 09:52:45 +02:00
event: don't let --outbox relays accumulated for one stdin event leak into the next ones.
This commit is contained in:
5
event.go
5
event.go
@@ -185,7 +185,7 @@ example:
|
||||
),
|
||||
ArgsUsage: "[relay...]",
|
||||
Action: func(ctx context.Context, c *cli.Command) error {
|
||||
relayUrls := c.Args().Slice()
|
||||
argRelayUrls := c.Args().Slice()
|
||||
|
||||
kr, sec, err := gatherKeyerFromArguments(ctx, c)
|
||||
if err != nil {
|
||||
@@ -383,6 +383,9 @@ example:
|
||||
}
|
||||
|
||||
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 c.Bool("outbox") {
|
||||
if evt.PubKey != nostr.ZeroPK {
|
||||
|
||||
Reference in New Issue
Block a user