aboutsummaryrefslogtreecommitdiffstats
path: root/cache/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/filter.go')
-rw-r--r--cache/filter.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/cache/filter.go b/cache/filter.go
index b26e7ae1..27e92cf3 100644
--- a/cache/filter.go
+++ b/cache/filter.go
@@ -33,8 +33,7 @@ func AuthorFilter(query string) Filter {
panic("missing identity in the cache")
}
- return strings.Contains(strings.ToLower(author.Name), query) ||
- strings.Contains(strings.ToLower(author.Login), query)
+ return author.Match(query)
}
// Legacy identity support
@@ -66,9 +65,7 @@ func ActorFilter(query string) Filter {
panic("missing identity in the cache")
}
- if query == identityExcerpt.Id ||
- strings.Contains(strings.ToLower(identityExcerpt.Name), query) ||
- query == strings.ToLower(identityExcerpt.Login) {
+ if identityExcerpt.Match(query) {
return true
}
}
@@ -87,9 +84,7 @@ func ParticipantFilter(query string) Filter {
panic("missing identity in the cache")
}
- if query == identityExcerpt.Id ||
- strings.Contains(strings.ToLower(identityExcerpt.Name), query) ||
- query == strings.ToLower(identityExcerpt.Login) {
+ if identityExcerpt.Match(query) {
return true
}
}