mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-03 04:15:39 +00:00
Merge branch 'dev' of https://github.com/loki-project/session-android into closed-groups-update
This commit is contained in:
commit
54ba848d09
@ -93,11 +93,8 @@ class Poller {
|
|||||||
task { Unit } // The long polling connection has been canceled; don't recurse
|
task { Unit } // The long polling connection has been canceled; don't recurse
|
||||||
} else {
|
} else {
|
||||||
val messages = SnodeAPI.parseRawMessagesResponse(rawResponse, snode, userPublicKey)
|
val messages = SnodeAPI.parseRawMessagesResponse(rawResponse, snode, userPublicKey)
|
||||||
messages.forEach { message ->
|
messages.forEach { envelope ->
|
||||||
val rawMessageAsJSON = message as? Map<*, *>
|
val job = MessageReceiveJob(envelope.toByteArray(), false)
|
||||||
val base64EncodedData = rawMessageAsJSON?.get("data") as? String
|
|
||||||
val data = base64EncodedData?.let { Base64.decode(it) } ?: return@forEach
|
|
||||||
val job = MessageReceiveJob(MessageWrapper.unwrap(data).toByteArray(), false)
|
|
||||||
JobQueue.shared.add(job)
|
JobQueue.shared.add(job)
|
||||||
}
|
}
|
||||||
poll(snode, deferred)
|
poll(snode, deferred)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user