req: -d flag too.

This commit is contained in:
fiatjaf 2024-01-17 08:50:59 -03:00
parent 59a2c16b42
commit 77103cae0c
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

8
req.go
View File

@ -62,6 +62,11 @@ example:
Usage: "shortcut for --tag p=<value>",
Category: CATEGORY_FILTER_ATTRIBUTES,
},
&cli.StringSliceFlag{
Name: "d",
Usage: "shortcut for --tag d=<value>",
Category: CATEGORY_FILTER_ATTRIBUTES,
},
&cli.StringFlag{
Name: "since",
Aliases: []string{"s"},
@ -179,6 +184,9 @@ example:
for _, ptag := range c.StringSlice("p") {
tags = append(tags, []string{"p", ptag})
}
for _, dtag := range c.StringSlice("d") {
tags = append(tags, []string{"d", dtag})
}
if len(tags) > 0 && filter.Tags == nil {
filter.Tags = make(nostr.TagMap)