Remove now-unnecessary data from prekey upload request.

This commit is contained in:
Greyson Parrelli
2023-12-20 16:46:40 -05:00
committed by Clark Chen
parent 6d150aa5cb
commit b2cdb46c84
6 changed files with 2 additions and 18 deletions

View File

@@ -5,7 +5,6 @@
package org.whispersystems.signalservice.api.account
import org.signal.libsignal.protocol.IdentityKey
import org.signal.libsignal.protocol.state.KyberPreKeyRecord
import org.signal.libsignal.protocol.state.PreKeyRecord
import org.signal.libsignal.protocol.state.SignedPreKeyRecord
@@ -18,7 +17,6 @@ import org.whispersystems.signalservice.api.push.ServiceIdType
*/
data class PreKeyUpload(
val serviceIdType: ServiceIdType,
val identityKey: IdentityKey,
val signedPreKey: SignedPreKeyRecord?,
val oneTimeEcPreKeys: List<PreKeyRecord>?,
val lastResortKyberPreKey: KyberPreKeyRecord?,

View File

@@ -12,11 +12,6 @@ import java.util.List;
public class PreKeyState {
@JsonProperty("identityKey")
@JsonSerialize(using = JsonUtil.IdentityKeySerializer.class)
@JsonDeserialize(using = JsonUtil.IdentityKeyDeserializer.class)
private IdentityKey identityKey;
@JsonProperty("preKeys")
private List<PreKeyEntity> oneTimeEcPreKeys;
@@ -32,23 +27,17 @@ public class PreKeyState {
public PreKeyState() {}
public PreKeyState(
IdentityKey identityKey,
SignedPreKeyEntity signedPreKey,
List<PreKeyEntity> oneTimeEcPreKeys,
KyberPreKeyEntity lastResortKyberPreKey,
List<KyberPreKeyEntity> oneTimeKyberPreKeys
) {
this.identityKey = identityKey;
this.signedPreKey = signedPreKey;
this.oneTimeEcPreKeys = oneTimeEcPreKeys;
this.lastResortKyberKey = lastResortKyberPreKey;
this.oneTimeKyberKeys = oneTimeKyberPreKeys;
}
public IdentityKey getIdentityKey() {
return identityKey;
}
public List<PreKeyEntity> getPreKeys() {
return oneTimeEcPreKeys;
}

View File

@@ -745,8 +745,7 @@ public class PushServiceSocket {
makeServiceRequest(String.format(Locale.US, PREKEY_PATH, preKeyUpload.getServiceIdType().queryParam()),
"PUT",
JsonUtil.toJson(new PreKeyState(preKeyUpload.getIdentityKey(),
signedPreKey,
JsonUtil.toJson(new PreKeyState(signedPreKey,
oneTimeEcPreKeys,
lastResortKyberPreKey,
oneTimeKyberPreKeys)));