mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 03:47:43 +00:00
Add legacy and pre-release ui updates
This commit is contained in:
@@ -115,7 +115,7 @@ class JobQueue : JobDelegate {
|
||||
|
||||
while (isActive) {
|
||||
when (val job = queue.receive()) {
|
||||
is NotifyPNServerJob, is AttachmentUploadJob, is MessageSendJob -> {
|
||||
is NotifyPNServerJob, is AttachmentUploadJob, is MessageSendJob, is DisappearingMessagesJob -> {
|
||||
txQueue.send(job)
|
||||
}
|
||||
is AttachmentDownloadJob -> {
|
||||
@@ -136,7 +136,7 @@ class JobQueue : JobDelegate {
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
throw IllegalStateException("Unexpected job type.")
|
||||
throw IllegalStateException("Unexpected job type: ${job.getFactoryKey()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@ import org.session.libsession.messaging.messages.control.CallMessage
|
||||
import org.session.libsession.messaging.messages.control.ClosedGroupControlMessage
|
||||
import org.session.libsession.messaging.messages.control.ConfigurationMessage
|
||||
import org.session.libsession.messaging.messages.control.ExpirationTimerUpdate
|
||||
import org.session.libsession.messaging.messages.control.SyncedExpiriesMessage
|
||||
import org.session.libsession.messaging.messages.control.UnsendRequest
|
||||
import org.session.libsession.messaging.messages.visible.LinkPreview
|
||||
import org.session.libsession.messaging.messages.visible.Profile
|
||||
@@ -131,7 +132,11 @@ object MessageSender {
|
||||
// Convert it to protobuf
|
||||
val proto = message.toProto() ?: throw Error.ProtoConversionFailed
|
||||
// Serialize the protobuf
|
||||
val plaintext = PushTransportDetails.getPaddedMessageBody(proto.toByteArray())
|
||||
val plaintext = if (message is SyncedExpiriesMessage) {
|
||||
proto.toByteArray()
|
||||
} else {
|
||||
PushTransportDetails.getPaddedMessageBody(proto.toByteArray())
|
||||
}
|
||||
// Encrypt the serialized protobuf
|
||||
val ciphertext = when (destination) {
|
||||
is Destination.Contact -> MessageEncrypter.encrypt(plaintext, destination.publicKey)
|
||||
|
Reference in New Issue
Block a user