mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 07:48:02 +01:00
Require Android clients to support the gv2-3 capability
This commit is contained in:
@@ -252,8 +252,9 @@ public class DeviceController {
|
||||
if (account.isGroupsV2Supported()) {
|
||||
try {
|
||||
switch (UserAgentUtil.parseUserAgentString(userAgent).getPlatform()) {
|
||||
case DESKTOP:
|
||||
case ANDROID: {
|
||||
if (!capabilities.isGv2() && !capabilities.isGv2_2() && !capabilities.isGv2_3()) {
|
||||
if (!capabilities.isGv2_3()) {
|
||||
isDowngrade = true;
|
||||
}
|
||||
|
||||
@@ -267,14 +268,6 @@ public class DeviceController {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case DESKTOP: {
|
||||
if (!capabilities.isGv2_3()) {
|
||||
isDowngrade = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (final UnrecognizedUserAgentException e) {
|
||||
// If we can't parse the UA string, the client is for sure too old to support groups V2
|
||||
|
||||
@@ -255,13 +255,9 @@ public class Device {
|
||||
final boolean groupsV2Supported;
|
||||
|
||||
if (this.capabilities != null) {
|
||||
boolean ios = this.apnId != null || this.voipApnId != null;
|
||||
boolean android = isMaster() && !ios;
|
||||
|
||||
if (android) groupsV2Supported = this.capabilities.isGv2() || this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
else if (ios) groupsV2Supported = this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
else groupsV2Supported = this.capabilities.isGv2_3();
|
||||
final boolean ios = this.apnId != null || this.voipApnId != null;
|
||||
|
||||
groupsV2Supported = this.capabilities.isGv2_3() || (ios && this.capabilities.isGv2_2());
|
||||
} else {
|
||||
groupsV2Supported = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user