mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
fix: treat result as number and convert to Long
This commit is contained in:
parent
19384eeb5b
commit
b55d0ad270
@ -214,7 +214,7 @@ object OpenGroupAPIV2 {
|
||||
val parameters = mapOf( "file" to base64EncodedFile )
|
||||
val request = Request(verb = POST, room = room, server = server, endpoint = "files", parameters = parameters)
|
||||
return send(request).map { json ->
|
||||
json["result"] as? Long ?: throw Error.ParsingFailed
|
||||
(json["result"] as? Number)?.toLong() ?: throw Error.ParsingFailed
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user