mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Fix build
This commit is contained in:
parent
6829895995
commit
8e836aa175
@ -88,17 +88,16 @@ class MessageSendJob(val message: Message, val destination: Destination) : Job {
|
|||||||
override fun serialize(): Data {
|
override fun serialize(): Data {
|
||||||
val kryo = Kryo()
|
val kryo = Kryo()
|
||||||
kryo.isRegistrationRequired = false
|
kryo.isRegistrationRequired = false
|
||||||
val output = Output(ByteArray(4096), MAX_BUFFER_SIZE)
|
|
||||||
// Message
|
// Message
|
||||||
kryo.writeClassAndObject(output, message)
|
val messageOutput = Output(ByteArray(4096), MAX_BUFFER_SIZE)
|
||||||
output.close()
|
kryo.writeClassAndObject(messageOutput, message)
|
||||||
val serializedMessage = output.toBytes()
|
messageOutput.close()
|
||||||
output.clear()
|
val serializedMessage = messageOutput.toBytes()
|
||||||
// Destination
|
// Destination
|
||||||
kryo.writeClassAndObject(output, destination)
|
val destinationOutput = Output(ByteArray(4096), MAX_BUFFER_SIZE)
|
||||||
output.close()
|
kryo.writeClassAndObject(destinationOutput, destination)
|
||||||
val serializedDestination = output.toBytes()
|
destinationOutput.close()
|
||||||
output.clear()
|
val serializedDestination = destinationOutput.toBytes()
|
||||||
// Serialize
|
// Serialize
|
||||||
return Data.Builder()
|
return Data.Builder()
|
||||||
.putByteArray(MESSAGE_KEY, serializedMessage)
|
.putByteArray(MESSAGE_KEY, serializedMessage)
|
||||||
|
Loading…
Reference in New Issue
Block a user