mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 12:18:09 +01:00
Drop the UUID addressing capability flag entirely.
This commit is contained in:
committed by
Jon Chambers
parent
a567f4a6de
commit
ebc3a251b7
@@ -197,7 +197,7 @@ public class ProfileController {
|
||||
accountProfile.get().getIdentityKey(),
|
||||
UnidentifiedAccessChecksum.generateFor(accountProfile.get().getUnidentifiedAccessKey()),
|
||||
accountProfile.get().isUnrestrictedUnidentifiedAccess(),
|
||||
new UserCapabilities(accountProfile.get().isUuidAddressingSupported(), accountProfile.get().isGroupsV2Supported()),
|
||||
new UserCapabilities(accountProfile.get().isGroupsV2Supported()),
|
||||
username.orElse(null),
|
||||
null,
|
||||
credential.orElse(null),
|
||||
@@ -235,7 +235,7 @@ public class ProfileController {
|
||||
accountProfile.get().getIdentityKey(),
|
||||
UnidentifiedAccessChecksum.generateFor(accountProfile.get().getUnidentifiedAccessKey()),
|
||||
accountProfile.get().isUnrestrictedUnidentifiedAccess(),
|
||||
new UserCapabilities(accountProfile.get().isUuidAddressingSupported(), accountProfile.get().isGroupsV2Supported()),
|
||||
new UserCapabilities(accountProfile.get().isGroupsV2Supported()),
|
||||
username,
|
||||
accountProfile.get().getUuid(),
|
||||
null,
|
||||
@@ -308,7 +308,7 @@ public class ProfileController {
|
||||
accountProfile.get().getIdentityKey(),
|
||||
UnidentifiedAccessChecksum.generateFor(accountProfile.get().getUnidentifiedAccessKey()),
|
||||
accountProfile.get().isUnrestrictedUnidentifiedAccess(),
|
||||
new UserCapabilities(accountProfile.get().isUuidAddressingSupported(), accountProfile.get().isGroupsV2Supported()),
|
||||
new UserCapabilities(accountProfile.get().isGroupsV2Supported()),
|
||||
username.orElse(null),
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -3,23 +3,15 @@ package org.whispersystems.textsecuregcm.entities;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class UserCapabilities {
|
||||
@JsonProperty
|
||||
private boolean uuid;
|
||||
|
||||
@JsonProperty
|
||||
private boolean gv2;
|
||||
|
||||
public UserCapabilities() {}
|
||||
|
||||
public UserCapabilities(boolean uuid, boolean gv2) {
|
||||
this.uuid = uuid;
|
||||
public UserCapabilities(boolean gv2) {
|
||||
this.gv2 = gv2;
|
||||
}
|
||||
|
||||
public boolean isUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public boolean isGv2() {
|
||||
return gv2;
|
||||
}
|
||||
|
||||
@@ -137,12 +137,6 @@ public class Account implements Principal {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public boolean isUuidAddressingSupported() {
|
||||
return devices.stream()
|
||||
.filter(Device::isEnabled)
|
||||
.allMatch(device -> device.getCapabilities() != null && device.getCapabilities().isUuid());
|
||||
}
|
||||
|
||||
public boolean isGroupsV2Supported() {
|
||||
return devices.stream()
|
||||
.filter(Device::isEnabled)
|
||||
|
||||
@@ -267,9 +267,6 @@ public class Device {
|
||||
}
|
||||
|
||||
public static class DeviceCapabilities {
|
||||
@JsonProperty
|
||||
private boolean uuid;
|
||||
|
||||
@JsonProperty
|
||||
private boolean gv2;
|
||||
|
||||
@@ -281,17 +278,12 @@ public class Device {
|
||||
|
||||
public DeviceCapabilities() {}
|
||||
|
||||
public DeviceCapabilities(boolean uuid, boolean gv2, boolean storage, boolean transfer) {
|
||||
this.uuid = uuid;
|
||||
public DeviceCapabilities(boolean gv2, boolean storage, boolean transfer) {
|
||||
this.gv2 = gv2;
|
||||
this.storage = storage;
|
||||
this.transfer = transfer;
|
||||
}
|
||||
|
||||
public boolean isUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public boolean isGv2() {
|
||||
return gv2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user