aboutsummaryrefslogtreecommitdiffstats
path: root/cache/filter.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-07-01 20:00:53 +0200
committerMichael Muré <batolettre@gmail.com>2020-10-04 20:50:15 +0200
commit499dbc0a032ff28eea99e5308be9b6c8f2d208ad (patch)
tree0ebfbc122240736292338275a5b599abaa7d710b /cache/filter.go
parent5d1fc3ff393133a8aa67b97f9beecfe9b57c7e56 (diff)
downloadgit-bug-499dbc0a032ff28eea99e5308be9b6c8f2d208ad.tar.gz
identity: remove support for legacy identity
Diffstat (limited to 'cache/filter.go')
-rw-r--r--cache/filter.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/cache/filter.go b/cache/filter.go
index 166cd48d..2ac56ab5 100644
--- a/cache/filter.go
+++ b/cache/filter.go
@@ -29,19 +29,12 @@ func AuthorFilter(query string) Filter {
return func(excerpt *BugExcerpt, resolver resolver) bool {
query = strings.ToLower(query)
- // Normal identity
- if excerpt.AuthorId != "" {
- author, err := resolver.ResolveIdentityExcerpt(excerpt.AuthorId)
- if err != nil {
- panic(err)
- }
-
- return author.Match(query)
+ author, err := resolver.ResolveIdentityExcerpt(excerpt.AuthorId)
+ if err != nil {
+ panic(err)
}
- // Legacy identity support
- return strings.Contains(strings.ToLower(excerpt.LegacyAuthor.Name), query) ||
- strings.Contains(strings.ToLower(excerpt.LegacyAuthor.Login), query)
+ return author.Match(query)
}
}