mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-31 10:56:09 +00:00
Enable the Zk group library.
This commit is contained in:
committed by
Greyson Parrelli
parent
098b298646
commit
36df3f234f
@@ -4,7 +4,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
public final class BadGroupIdException extends Exception {
|
||||
|
||||
public BadGroupIdException() {
|
||||
BadGroupIdException() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -425,11 +425,7 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||
Log.w(TAG, e);
|
||||
handleCorruptMessage(e.getSender(), e.getSenderDevice(), timestamp, smsMessageId);
|
||||
} catch (BadGroupIdException e) {
|
||||
if (!FeatureFlags.ZK_GROUPS) {
|
||||
Log.w(TAG, "Ignoring message with GV2 - no ZK_GROUP library", e);
|
||||
} else {
|
||||
Log.w(TAG, "Ignoring message with bad group id", e);
|
||||
}
|
||||
Log.w(TAG, "Ignoring message with bad group id", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ public final class FeatureFlags {
|
||||
|
||||
/** Groups v2 send and receive. */
|
||||
public static boolean groupsV2() {
|
||||
return org.whispersystems.signalservice.FeatureFlags.ZK_GROUPS && getBoolean(GROUPS_V2, false);
|
||||
return getBoolean(GROUPS_V2, false);
|
||||
}
|
||||
|
||||
/** Groups v2 send and receive. */
|
||||
@@ -507,7 +507,4 @@ public final class FeatureFlags {
|
||||
|
||||
/** Read and write versioned profile information. */
|
||||
public static final boolean VERSIONED_PROFILES = org.whispersystems.signalservice.FeatureFlags.VERSIONED_PROFILES;
|
||||
|
||||
/** Enabled ZKGroups library. */
|
||||
public static final boolean ZK_GROUPS = org.whispersystems.signalservice.FeatureFlags.ZK_GROUPS;
|
||||
}
|
||||
|
||||
@@ -41,9 +41,6 @@ public final class GroupUtil {
|
||||
if (groupContext.getGroupV1().isPresent()) {
|
||||
return GroupId.v1(groupContext.getGroupV1().get().getGroupId());
|
||||
} else if (groupContext.getGroupV2().isPresent()) {
|
||||
if (!FeatureFlags.ZK_GROUPS) {
|
||||
throw new BadGroupIdException();
|
||||
}
|
||||
return GroupId.v2(groupContext.getGroupV2().get().getMasterKey());
|
||||
} else {
|
||||
throw new AssertionError();
|
||||
|
||||
Reference in New Issue
Block a user