@@ -689,6 +689,29 @@ public synchronized static Method loadAntiRevokeOnStartMethod(ClassLoader loader
689689 });
690690 }
691691
692+ public synchronized static Method loadHomeConversationFragmentMethod (ClassLoader loader ) throws Exception {
693+ return UnobfuscatorCache .getInstance ().getMethod (loader , () -> {
694+ var homeClass = WppCore .getHomeActivityClass (loader );
695+ var convFragment = XposedHelpers .findClass ("com.whatsapp.ConversationFragment" , loader );
696+ MethodData method = dexkit .findMethod (FindMethod .create ()
697+ .searchInClass (
698+ Collections .singletonList (
699+ dexkit .getClassData (homeClass )))
700+ .matcher (MethodMatcher .create ().returnType (convFragment ))).singleOrNull ();
701+ if (method == null ) throw new Exception ("HomeConversationFragmentMethod not found" );
702+ return method .getMethodInstance (loader );
703+ });
704+ }
705+
706+ public synchronized static Field loadAntiRevokeConvFragmentField (ClassLoader loader ) throws Exception {
707+ return UnobfuscatorCache .getInstance ().getField (loader , () -> {
708+ Class <?> chatClass = findFirstClassUsingStrings (loader , StringMatchType .Contains , "conversation/createconversation" );
709+ Class <?> conversation = XposedHelpers .findClass ("com.whatsapp.ConversationFragment" , loader );
710+ Field field = ReflectionUtils .getFieldByType (conversation , chatClass );
711+ if (field == null ) throw new Exception ("AntiRevokeConvChat field not found" );
712+ return field ;
713+ });
714+ }
692715
693716 public synchronized static Field loadAntiRevokeConvChatField (ClassLoader loader ) throws Exception {
694717 return UnobfuscatorCache .getInstance ().getField (loader , () -> {
0 commit comments