-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package moe.qwq.miko.hooks | ||
|
||
import android.content.Context | ||
import com.tencent.mobileqq.aio.msg.AIOMsgItem | ||
import de.robv.android.xposed.XposedBridge | ||
import moe.fuqiuluo.xposed.loader.LuoClassloader | ||
import moe.qwq.miko.actions.IAction | ||
import moe.qwq.miko.ext.beforeHook | ||
import moe.qwq.miko.internals.setting.QwQSetting | ||
|
||
class DisableReplyAt: IAction { | ||
override fun onRun(ctx: Context) { | ||
val replyAt = LuoClassloader.load("com.tencent.mobileqq.aio.input.reply.c") // 混淆的类名 | ||
?: throw RuntimeException("ReplyAt not found") | ||
replyAt.declaredMethods.firstOrNull { | ||
it.returnType == Void.TYPE && it.parameterTypes.size == 1 && it.parameterTypes[0] == AIOMsgItem::class.java | ||
}?.let { | ||
val hook = beforeHook { param -> | ||
param.result = Unit | ||
} | ||
XposedBridge.hookMethod(it, hook) | ||
} | ||
} | ||
|
||
override val name: String = QwQSetting.DISABLE_REPLY_AT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
qqinterface/src/main/java/com/tencent/mobileqq/aio/msg/AIOMsgItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.tencent.mobileqq.aio.msg; | ||
|
||
public class AIOMsgItem { | ||
} |