Moves metadata methods from User to UserCache object

This commit is contained in:
Vitor Pamplona
2026-02-07 10:18:13 -05:00
parent 823624f8f2
commit 4e39a531b7
7 changed files with 62 additions and 74 deletions
@@ -88,7 +88,7 @@ class DesktopLocalCache : ICacheProvider {
// Search by name/displayName/nip05/lud16
return users.values
.filter { user ->
user.anyNameStartsWith(prefix) ||
user.metadataOrNull()?.anyNameStartsWith(prefix) == true ||
user.pubkeyHex.startsWith(prefix, ignoreCase = true) ||
user.pubkeyNpub().startsWith(prefix, ignoreCase = true)
}.sortedWith(