Skip to content

Commit

Permalink
fix: MultiActionHook adds a recall delay when the msg > 10
Browse files Browse the repository at this point in the history
  • Loading branch information
HdShare committed Oct 28, 2024
1 parent c6cd502 commit aab611b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/java/me/ketal/hook/MultiActionHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ object MultiActionHook : CommonSwitchFunctionHook(
.map { it!!.invoke("getMsgId") as Long }
Log.d("handleIntent, msg: ${list.joinToString("\n") { it.toString() }}")
val msgServer = MsgServiceHelper.getKernelMsgService(AppRuntimeHelper.getAppRuntime()!!)
msgServer!!.recallMsg(SessionUtils.AIOParam2Contact(nt_aioParam), ArrayList<Long>(list)) { i2, str ->
Log.d("do recallMsg result:$str")
thread {
list.chunked(10).forEach { subList ->
msgServer!!.recallMsg(SessionUtils.AIOParam2Contact(nt_aioParam), ArrayList<Long>(subList)) { i2, str ->
Log.d("do recallMsg result:$str")
}
sleep(3500)
}
}
it.result = null
}
Expand Down

0 comments on commit aab611b

Please sign in to comment.