diff --git a/app/build.gradle b/app/build.gradle index cdbf8578..dc210961 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { ext.versionMajor = 1 ext.versionMinor = 2 -ext.versionPatch = 3 +ext.versionPatch = 4 ext.grindrVersion = '9.7.0' private String genVersionName() { diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt index eb3d4bbc..d4e5c199 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt @@ -1197,19 +1197,20 @@ object Hooks { fun dontSendChatMarkers() { findAndHookMethod( - "org.jivesoftware.smack.packet.Stanza", + GApp.xmpp.ChatMarkersManager, Hooker.pkgParam.classLoader, - "addExtension", - "org.jivesoftware.smack.packet.ExtensionElement", - object : XC_MethodHook() { - override fun beforeHookedMethod(param: MethodHookParam) { - if (param.args[0] == null) return - val elementName = callMethod(param.args[0], "getElementName") as String - if (elementName in arrayOf("received", "displayed")) { - param.args[0] = null - } - } - } + GApp.xmpp.ChatMarkersManager_.addDisplayedExtension, + "org.jivesoftware.smack.chat2.Chat", + "org.jivesoftware.smack.packet.Message", + XC_MethodReplacement.DO_NOTHING + ) + findAndHookMethod( + GApp.xmpp.ChatMarkersManager, + Hooker.pkgParam.classLoader, + GApp.xmpp.ChatMarkersManager_.addReceivedExtension, + "org.jivesoftware.smack.chat2.Chat", + "org.jivesoftware.smack.packet.Message", + XC_MethodReplacement.DO_NOTHING ) } diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt index 81e4c712..a959dc6e 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt @@ -317,6 +317,13 @@ object Obfuscation { object ChatMessageManager_ { const val handleIncomingChatMessage = "p" } + + const val ChatMarkersManager = "$_xmpp.i" + + object ChatMarkersManager_ { + const val addDisplayedExtension = "d" + const val addReceivedExtension = "f" + } } } } \ No newline at end of file