mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-20 19:30:46 +02:00
Solves crashing when events have null tags.
This commit is contained in:
@@ -89,7 +89,7 @@ open class Event(
|
|||||||
createdAt = jsonObject.get("created_at").asLong,
|
createdAt = jsonObject.get("created_at").asLong,
|
||||||
kind = jsonObject.get("kind").asInt,
|
kind = jsonObject.get("kind").asInt,
|
||||||
tags = jsonObject.get("tags").asJsonArray.map {
|
tags = jsonObject.get("tags").asJsonArray.map {
|
||||||
it.asJsonArray.map { s -> s.asString }
|
it.asJsonArray.mapNotNull { s -> if (s.isJsonNull) null else s.asString }
|
||||||
},
|
},
|
||||||
content = jsonObject.get("content").asString,
|
content = jsonObject.get("content").asString,
|
||||||
sig = jsonObject.get("sig").asString
|
sig = jsonObject.get("sig").asString
|
||||||
|
Reference in New Issue
Block a user