Add legacy and pre-release ui updates

This commit is contained in:
charles
2022-12-01 13:40:48 +11:00
parent cc8fdb58dd
commit 84ee3eba21
7 changed files with 49 additions and 4 deletions

View File

@@ -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()}")
}
}
}

View File

@@ -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)