mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 14:52:20 +00:00
Clean
This commit is contained in:
@@ -112,7 +112,7 @@ fun shouldAutomaticallyBecomeFriendsWithDevice(publicKey: String, context: Conte
|
||||
fun sendPairingAuthorisationMessage(context: Context, contactHexEncodedPublicKey: String, authorisation: DeviceLink): Promise<Unit, Exception> {
|
||||
val messageSender = ApplicationContext.getInstance(context).communicationModule.provideSignalMessageSender()
|
||||
val address = SignalServiceAddress(contactHexEncodedPublicKey)
|
||||
val message = SignalServiceDataMessage.newBuilder().withPairingAuthorisation(authorisation)
|
||||
val message = SignalServiceDataMessage.newBuilder().withDeviceLink(authorisation)
|
||||
// A REQUEST should always act as a friend request. A GRANT should always be replying back as a normal message.
|
||||
if (authorisation.type == DeviceLink.Type.REQUEST) {
|
||||
val preKeyBundle = DatabaseFactory.getLokiPreKeyBundleDatabase(context).generatePreKeyBundle(address.number)
|
||||
|
||||
@@ -10,8 +10,6 @@ import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint
|
||||
import org.thoughtcrime.securesms.jobs.BaseJob
|
||||
import org.thoughtcrime.securesms.logging.Log
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.whispersystems.libsignal.util.guava.Optional
|
||||
import org.whispersystems.signalservice.api.crypto.UnidentifiedAccessPair
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress
|
||||
import org.whispersystems.signalservice.internal.util.JsonUtil
|
||||
@@ -99,7 +97,7 @@ class PushBackgroundMessageSendJob private constructor(
|
||||
}
|
||||
|
||||
if (message.get("sessionRestore", false)) {
|
||||
dataMessage.asSessionRestore(true)
|
||||
dataMessage.asSessionRestorationRequest(true)
|
||||
}
|
||||
|
||||
if (message.get("sessionRequest", false)) {
|
||||
|
||||
Reference in New Issue
Block a user