mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 12:08:03 +01:00
Require desktop clients to send the new gv2-2 capability flag.
This commit is contained in:
committed by
Jon Chambers
parent
f79c998f95
commit
77de0f86dc
@@ -140,13 +140,7 @@ public class Account implements Principal {
|
||||
public boolean isGroupsV2Supported() {
|
||||
return devices.stream()
|
||||
.filter(Device::isEnabled)
|
||||
.allMatch(device -> {
|
||||
if (device.getApnId() != null || device.getVoipApnId() != null) {
|
||||
return device.getCapabilities() != null && device.getCapabilities().isGv2_2();
|
||||
} else {
|
||||
return device.getCapabilities() != null && (device.getCapabilities().isGv2() || device.getCapabilities().isGv2_2());
|
||||
}
|
||||
});
|
||||
.allMatch(Device::isGroupsV2Supported);
|
||||
}
|
||||
|
||||
public boolean isStorageSupported() {
|
||||
|
||||
@@ -251,6 +251,14 @@ public class Device {
|
||||
return this.userAgent;
|
||||
}
|
||||
|
||||
public boolean isGroupsV2Supported() {
|
||||
if (this.getGcmId() != null) {
|
||||
return this.capabilities != null && (this.capabilities.isGv2() || this.capabilities.isGv2_2());
|
||||
} else {
|
||||
return this.capabilities != null && this.capabilities.isGv2_2();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == null || !(other instanceof Device)) return false;
|
||||
|
||||
Reference in New Issue
Block a user