Add anti noforward (#10)

This commit is contained in:
Henry Zhang 2021-12-14 18:43:57 +08:00 committed by GitHub
parent 38601a79ec
commit 37690d8f3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,7 @@ public class MainHook implements IXposedHookLoadPackage {
try {
Class<?> messagesControllerClass = XposedHelpers.findClass("org.telegram.messenger.MessagesController", lpparam.classLoader);
XposedBridge.hookAllMethods(messagesControllerClass, "getSponsoredMessages", XC_MethodReplacement.returnConstant(null));
XposedBridge.hookAllMethods(messagesControllerClass, "isChatNoForwards", XC_MethodReplacement.returnConstant(false));
} catch (Throwable ignored) {
}
}