mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 13:27:47 +01:00
Fixes crash when checking and creating new users from tags.
This commit is contained in:
@@ -298,7 +298,7 @@ object LocalCache : ILocalCache {
|
||||
observablesByKindAndAuthor[event.kind]?.get(event.pubKey)?.updateIfMatches(event)
|
||||
}
|
||||
|
||||
fun checkGetOrCreateUser(key: String): User? = getOrCreateUser(key)
|
||||
fun checkGetOrCreateUser(key: String): User? = runCatching { getOrCreateUser(key) }.getOrNull()
|
||||
|
||||
fun getOrCreateUser(key: HexKey): User {
|
||||
require(isValidHex(key = key)) { "$key is not a valid hex" }
|
||||
|
||||
Reference in New Issue
Block a user