From 2e589b9bf4007bba7ebc340dacf9a5d735a68a31 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Wed, 29 May 2024 12:29:06 -0300 Subject: [PATCH] Dump new version --- .github/workflows/android.yml | 2 +- app/build.gradle.kts | 17 +++++++++++------ .../xposed/features/general/AntiRevoke.java | 4 +++- .../xposed/features/general/Others.java | 1 - .../xposed/features/general/SeenTick.java | 1 - .../xposed/features/general/ShareLimit.java | 2 +- changelog.txt | 8 ++++++-- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ac15f0c7..0c05dd30 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -36,7 +36,7 @@ jobs: - name: Build and test app run: | - ./gradlew assembleDebug + ./gradlew assembleDebug -Pminify=true - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 392f2949..65d6c418 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -61,12 +61,17 @@ android { buildTypes { all { - signingConfig = if (signingConfigs["config"].storeFile != null) signingConfigs["config"] else signingConfigs["debug"] -// isMinifyEnabled = true -// proguardFiles( -// getDefaultProguardFile("proguard-android-optimize.txt"), -// "proguard-rules.pro" -// ) + signingConfig = + if (signingConfigs["config"].storeFile != null) signingConfigs["config"] else signingConfigs["debug"] + if (project.hasProperty("minify") && project.properties["minify"].toString() + .toBoolean() + ) { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } } release { isMinifyEnabled = false diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/AntiRevoke.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/AntiRevoke.java index d12112fe..4d630922 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/AntiRevoke.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/AntiRevoke.java @@ -82,7 +82,9 @@ protected void beforeHookedMethod(MethodHookParam param) throws Exception { log(fieldMessageDetails); Utils.debugFields(classThreadMessage, objMessage); var fieldIsFromMe = XposedHelpers.getBooleanField(fieldMessageDetails, "A02"); - var type = XposedHelpers.getIntField(objMessage, "A01"); + var typeField = classThreadMessage.getDeclaredField("A01"); + typeField.setAccessible(true); + var type = typeField.getInt(objMessage); // delete user message in group as admin (8) if (!fieldIsFromMe && type != 8) { if (antiRevoke(objMessage) != 0) param.setResult(true); diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/Others.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/Others.java index b3969898..3525eb9c 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/Others.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/Others.java @@ -30,7 +30,6 @@ import com.wmods.wppenhacer.xposed.utils.ReflectionUtils; import java.io.File; -import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/SeenTick.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/SeenTick.java index bc818edf..c44093e9 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/SeenTick.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/SeenTick.java @@ -74,7 +74,6 @@ public void doHook() throws Throwable { var jid = WppCore.getCurrentRawJID(); if (!Objects.equals(jid, currentJid)) { currentJid = jid; - XposedBridge.log("Changed Start"); messages.clear(); } }); diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ShareLimit.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ShareLimit.java index 0f2c1d76..838f6b89 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ShareLimit.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ShareLimit.java @@ -27,7 +27,7 @@ public void doHook() throws Exception { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { if (prefs.getBoolean("removeforwardlimit", false)) { - XposedHelpers.setBooleanField(param.thisObject, shareLimitField.getName(), true); + shareLimitField.set(param.thisObject, true); } } }); diff --git a/changelog.txt b/changelog.txt index 53659f3f..37a0bade 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2 +1,6 @@ -[ANTIREVOKE MESSAGES] -* Fix critical bug in database \ No newline at end of file +[WHATSAPP] +* Add Support to Whatsapp 2.24.10.85 + +[ANTI REVOKE] +* fix error when deleting messages from other people in group as admin +