Skip to content

Commit

Permalink
Add some hook
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelsBoobz authored Jan 14, 2024
1 parent 33a5f7e commit 307c32f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/src/main/java/com/jeelsboobz/killergram/MainHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
if (chatUIActivityClass != null) {
XposedBridge.hookAllMethods(chatUIActivityClass, "addSponsoredMessages", XC_MethodReplacement.returnConstant(null));
}
if (chatUIActivityClass != null) {
XposedBridge.hookAllMethods(chatUIActivityClass, "openForward", XC_MethodReplacement.returnConstant(true));
}
Class<?> MessageObjectClass = XposedHelpers.findClassIfExists("org.telegram.messenger.MessageObject", lpparam.classLoader);
if (MessageObjectClass != null) {
XposedBridge.hookAllMethods(MessageObjectClass, "canForwardMessage", XC_MethodReplacement.returnConstant(true));
}
if (MessageObjectClass != null) {
XposedBridge.hookAllMethods(MessageObjectClass, "isSecretMedia", XC_MethodReplacement.returnConstant(true));
}
Class<?> SharedConfigClass = XposedHelpers.findClassIfExists("org.telegram.messenger.SharedConfig", lpparam.classLoader);
if (SharedConfigClass != null) {
XposedBridge.hookAllMethods(SharedConfigClass, "getDevicePerformanceClass", XC_MethodReplacement.returnConstant(2));
Expand Down

0 comments on commit 307c32f

Please sign in to comment.