Skip to content

Commit 3688f00

Browse files
committed
Refactor OnInsertReceipt method resolver in Unobfuscator
Signed-off-by: Dev4Mod <[email protected]>
1 parent dbb9c51 commit 3688f00

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,9 +1493,14 @@ public synchronized static Method loadNextStatusRunMethod(ClassLoader classLoade
14931493

14941494
public synchronized static Method loadOnInsertReceipt(ClassLoader classLoader) throws Exception {
14951495
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> {
1496-
var method = findFirstMethodUsingStrings(classLoader, StringMatchType.Contains, "ReceiptUserStore/insertOrUpdateUserReceiptForMessage");
1497-
if (method == null) throw new RuntimeException("OnInsertReceipt method not found");
1498-
return method;
1496+
var methods = dexkit.findMethod(FindMethod.create().matcher(MethodMatcher.create().addUsingString("INSERT_RECEIPT_USER")));
1497+
for (var method : methods) {
1498+
var params = method.getParamTypeNames();
1499+
if (!params.isEmpty() && "com.whatsapp.jid.UserJid".equals(params.get(0))) {
1500+
return method.getMethodInstance(classLoader);
1501+
}
1502+
}
1503+
throw new RuntimeException("OnInsertReceipt method not found");
14991504
});
15001505

15011506
}

0 commit comments

Comments
 (0)