Skip to content

Commit

Permalink
fix: ReplyNoAtHook for QQNT 4186
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Jun 20, 2023
1 parent b28bf3a commit d5a9362
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/src/main/java/cc/ioctl/hook/ui/chat/ReplyNoAtHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import cc.hicore.QApp.QAppUtils;
import cc.ioctl.util.HookUtils;
import cc.ioctl.util.HostInfo;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import io.github.qauxv.base.annotation.FunctionHookEntry;
import io.github.qauxv.base.annotation.UiItemAgentEntry;
import io.github.qauxv.dsl.FunctionEntryRouter.Locations.Simplify;
Expand Down Expand Up @@ -77,7 +80,15 @@ private ReplyNoAtHook() {

@Override
public boolean initOnce() throws ReflectiveOperationException {
if (HostInfo.requireMinQQVersion(QQ_8_6_0)) {
if (QAppUtils.isQQnt()) {
XposedHelpers.findAndHookMethod(Initiator.load("com.tencent.mobileqq.aio.input.e.k"), "o",
Initiator.load("com.tencent.mobileqq.aio.msg.AIOMsgItem"), new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) {
param.setResult(null);
}
});
} else if (HostInfo.requireMinQQVersion(QQ_8_6_0)) {
String className = ConfigTable.getConfig(ReplyNoAtHook.class.getSimpleName());
if (className == null) {
return false;
Expand Down

0 comments on commit d5a9362

Please sign in to comment.