This commit is contained in:
SessionHero01
2024-10-31 09:39:55 +11:00
parent 905acab3f4
commit 7520571a7d
15 changed files with 80 additions and 161 deletions

View File

@@ -12,8 +12,6 @@ android {
defaultConfig {
minSdkVersion androidMinimumSdkVersion
// Build constant for which version should minimally support new groups
buildConfigField("String", "MINIMUM_GROUP_VERSION", '"1.19.0"')
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -73,11 +73,11 @@ public class IncomingMediaMessage {
if (group.isPresent()) {
SignalServiceGroup groupObject = group.get();
if (groupObject.isNewClosedGroup()) {
// new closed group 03..etc..
if (groupObject.isGroupV2()) {
// new groupv2 03..etc..
this.groupId = Address.fromSerialized(Hex.toStringCondensed(groupObject.getGroupId()));
} else {
// old closed group or open group
// legacy group or community
this.groupId = Address.fromSerialized(GroupUtil.getEncodedId(group.get()));
}
} else {

View File

@@ -82,7 +82,7 @@ public class IncomingTextMessage implements Parcelable {
if (group.isPresent()) {
SignalServiceGroup groupObject = group.get();
if (groupObject.isNewClosedGroup()) {
if (groupObject.isGroupV2()) {
// new closed group 03..etc..
this.groupId = Address.fromSerialized(Hex.toStringCondensed(groupObject.getGroupId()));
} else {

View File

@@ -168,9 +168,9 @@ fun MessageReceiver.cancelTypingIndicatorsIfNeeded(senderPublicKey: String) {
private fun MessageReceiver.handleExpirationTimerUpdate(message: ExpirationTimerUpdate) {
SSKEnvironment.shared.messageExpirationManager.insertExpirationTimerMessage(message)
val isGroupV1 = message.groupPublicKey != null && message.groupPublicKey?.startsWith(IdPrefix.GROUP.value) == false
val isLegacyGroup = message.groupPublicKey != null && message.groupPublicKey?.startsWith(IdPrefix.GROUP.value) == false
if (isNewConfigEnabled && !isGroupV1) return
if (isNewConfigEnabled && !isLegacyGroup) return
val module = MessagingModuleConfiguration.shared
try {