this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

search: allow at-prefixed handle with "from:" (#608)

has a bit of test coverage which gives me confidence, but haven't done
any other testings. blast radius seems small.

closes: https://github.com/bluesky-social/atproto/issues/2028

authored by

bnewbold and committed by
GitHub
9b28afd7 6162f1e2

+10 -1
+5 -1
search/parse_query.go
··· 43 43 continue 44 44 } 45 45 if strings.HasPrefix(p, "from:") && len(p) > 6 { 46 - handle, err := syntax.ParseHandle(p[5:]) 46 + h := p[5:] 47 + if h[0] == '@' { 48 + h = h[1:] 49 + } 50 + handle, err := syntax.ParseHandle(h) 47 51 if err != nil { 48 52 keep = append(keep, p) 49 53 continue
+5
search/parse_query_test.go
··· 55 55 q, f = ParseQuery(ctx, &dir, p6) 56 56 assert.Equal(`some other stuff`, q) 57 57 assert.Equal(2, len(f)) 58 + 59 + p7 := "known from:@known.example.com" 60 + q, f = ParseQuery(ctx, &dir, p7) 61 + assert.Equal("known", q) 62 + assert.Equal(1, len(f)) 58 63 }