From 882f3402e6099fb81e2b2213ecfdf521d4810048 Mon Sep 17 00:00:00 2001 From: Hicores Date: Fri, 3 Nov 2023 21:41:19 +0800 Subject: [PATCH] fix repeat voice Signed-off-by: Hicores --- app/src/main/java/cc/hicore/hook/RepeaterPlus.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/cc/hicore/hook/RepeaterPlus.java b/app/src/main/java/cc/hicore/hook/RepeaterPlus.java index 90ec203f20..df085b45d8 100644 --- a/app/src/main/java/cc/hicore/hook/RepeaterPlus.java +++ b/app/src/main/java/cc/hicore/hook/RepeaterPlus.java @@ -37,6 +37,7 @@ import android.widget.RelativeLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import cc.hicore.QApp.QAppUtils; import cc.hicore.ReflectUtil.MField; import cc.hicore.ReflectUtil.XField; import cc.hicore.ReflectUtil.XMethod; @@ -382,8 +383,12 @@ private void repeatByForwardNt(Object msg) { MsgAttributeInfo info = Nt_kernel_bridge.getDefaultAttributeInfo(); if (info != null) { attrMap.put(0, info); - service.forwardMsg(l, contact, c, attrMap, (i, str, hashMap) -> { - + service.getMsgsByMsgId(contact, l, (i, str, list) ->{ + if (list.size() > 0 && list.get(0).getElements().get(0).getPttElement() != null){ + service.sendMsg(service.getMsgUniqueId(QAppUtils.getServiceTime()),contact,list.get(0).getElements(),attrMap,(i1, str1) -> { }); + }else { + service.forwardMsg(l, contact, c, attrMap, (i2, str2, hashMap) -> { }); + } }); }