add delete_delay option in QuickOperation

This commit is contained in:
huan_kong 2024-02-26 15:05:13 +08:00
parent 252a3527a8
commit a78b5cab23

View File

@ -93,7 +93,11 @@ internal object QuickOperation: IActionHandler() {
}
if (MsgConstant.KCHATTYPEGROUP == record.chatType && operation.containsKey("delete") && operation["delete"].asBoolean) {
MsgSvc.recallMsg(msgHash)
Timer().schedule(object : TimerTask() {
override fun run() {
MsgSvc.recallMsg(msgHash)
}
}, operation['delete_delay'].asIntOrNull?.toUInt() ?: 0)
}
if (MsgConstant.KCHATTYPEGROUP == record.chatType && operation.containsKey("kick") && operation["kick"].asBoolean) {
GroupSvc.kickMember(record.peerUin, false, "", record.senderUin)