mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 14:43:09 +01:00
Fix bug with stale linked devices when changing number.
This commit is contained in:
committed by
Greyson Parrelli
parent
24b7593178
commit
ca0e52e141
@@ -2235,6 +2235,12 @@ public class SignalServiceMessageSender {
|
||||
archiveSessions(recipient, staleDevices.getStaleDevices());
|
||||
}
|
||||
|
||||
public void handleChangeNumberMismatchDevices(@Nonnull MismatchedDevices mismatchedDevices)
|
||||
throws IOException, UntrustedIdentityException
|
||||
{
|
||||
handleMismatchedDevices(socket, localAddress, mismatchedDevices);
|
||||
}
|
||||
|
||||
private void archiveSessions(SignalServiceAddress recipient, List<Integer> devices) {
|
||||
List<SignalProtocolAddress> addressesToClear = convertToProtocolAddresses(recipient, devices);
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ import java.util.List;
|
||||
|
||||
public class MismatchedDevices {
|
||||
@JsonProperty
|
||||
private List<Integer> missingDevices;
|
||||
public List<Integer> missingDevices;
|
||||
|
||||
@JsonProperty
|
||||
private List<Integer> extraDevices;
|
||||
public List<Integer> extraDevices;
|
||||
|
||||
public List<Integer> getMissingDevices() {
|
||||
return missingDevices;
|
||||
|
||||
@@ -20,6 +20,8 @@ public class OutgoingPushMessage {
|
||||
@JsonProperty
|
||||
private String content;
|
||||
|
||||
public OutgoingPushMessage() {}
|
||||
|
||||
public OutgoingPushMessage(int type,
|
||||
int destinationDeviceId,
|
||||
int destinationRegistrationId,
|
||||
|
||||
@@ -20,10 +20,10 @@ public class PreKeyResponse {
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = JsonUtil.IdentityKeySerializer.class)
|
||||
@JsonDeserialize(using = JsonUtil.IdentityKeyDeserializer.class)
|
||||
private IdentityKey identityKey;
|
||||
public IdentityKey identityKey;
|
||||
|
||||
@JsonProperty
|
||||
private List<PreKeyResponseItem> devices;
|
||||
public List<PreKeyResponseItem> devices;
|
||||
|
||||
public IdentityKey getIdentityKey() {
|
||||
return identityKey;
|
||||
|
||||
@@ -13,16 +13,16 @@ import org.whispersystems.signalservice.api.push.SignedPreKeyEntity;
|
||||
public class PreKeyResponseItem {
|
||||
|
||||
@JsonProperty
|
||||
private int deviceId;
|
||||
public int deviceId;
|
||||
|
||||
@JsonProperty
|
||||
private int registrationId;
|
||||
public int registrationId;
|
||||
|
||||
@JsonProperty
|
||||
private SignedPreKeyEntity signedPreKey;
|
||||
public SignedPreKeyEntity signedPreKey;
|
||||
|
||||
@JsonProperty
|
||||
private PreKeyEntity preKey;
|
||||
public PreKeyEntity preKey;
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
|
||||
Reference in New Issue
Block a user