Skip to content

Commit

Permalink
allow filters with long tags (the 1-char restriction is only a conven…
Browse files Browse the repository at this point in the history
…tion, not a rule).

fixes #44
  • Loading branch information
fiatjaf committed Nov 26, 2024
1 parent dd0ef2c commit f425097
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion count.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var count = &cli.Command{
tags := make([][]string, 0, 5)
for _, tagFlag := range c.StringSlice("tag") {
spl := strings.SplitN(tagFlag, "=", 2)
if len(spl) == 2 && len(spl[0]) == 1 {
if len(spl) == 2 {
tags = append(tags, spl)
} else {
return fmt.Errorf("invalid --tag '%s'", tagFlag)
Expand Down
2 changes: 1 addition & 1 deletion req.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func applyFlagsToFilter(c *cli.Command, filter *nostr.Filter) error {
tags := make([][]string, 0, 5)
for _, tagFlag := range c.StringSlice("tag") {
spl := strings.SplitN(tagFlag, "=", 2)
if len(spl) == 2 && len(spl[0]) == 1 {
if len(spl) == 2 {
tags = append(tags, spl)
} else {
return fmt.Errorf("invalid --tag '%s'", tagFlag)
Expand Down

0 comments on commit f425097

Please sign in to comment.