Skip to content

Commit

Permalink
Fix support to WhatsApp Business
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev4Mod committed May 17, 2024
1 parent 67f1fea commit 89853be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,11 @@ public static Method loadAntiRevokeMessageMethod(ClassLoader loader) throws Exce
public static Field loadMessageKeyField(ClassLoader loader) throws Exception {
return UnobfuscatorCache.getInstance().getField(loader, () -> {
var GroupJidClass = XposedHelpers.findClass("com.whatsapp.jid.GroupJid", loader);
var UserJidClass = XposedHelpers.findClass("com.whatsapp.jid.UserJid", loader);
var keyMessageList = dexkit.findClass(new FindClass().matcher(new ClassMatcher().addUsingString("Key").addMethod(new MethodMatcher().returnType(GroupJidClass))));
if (keyMessageList.isEmpty()){
keyMessageList = dexkit.findClass(new FindClass().matcher(new ClassMatcher().addUsingString("Key[id=").addMethod(new MethodMatcher().returnType(UserJidClass))));
}
if (keyMessageList.isEmpty()) throw new Exception("MessageKey class not found");
Class<?> keyMessageClass = keyMessageList.get(0).getInstance(loader);
var classMessage = loadThreadMessageClass(loader);
Expand Down
4 changes: 1 addition & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
* Update translations
* Improve compatibility with latest versions WhatsApp
* Improve toast on revoke message/status
* Fix support to WhatsApp Business

0 comments on commit 89853be

Please # to comment.