From ff74009f281e9b2956466309065a1b04b5f4ce37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E6=9C=89=E6=84=8F?= <48650471+CreepingG@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:41:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=96=B0=E7=89=88QQ=209.?= =?UTF-8?q?9.8=20=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 12e513f..8147a01 100644 --- a/main.js +++ b/main.js @@ -560,7 +560,8 @@ function onBrowserWindowCreated(window) { //拦截撤回IPC if ( args1.cmdName != null && - args1.cmdName.indexOf("onMsgInfoListUpdate") != -1 && + (args1.cmdName.indexOf("onMsgInfoListUpdate") != -1 || + args1.cmdName.indexOf("onActiveMsgInfoUpdate") != -1) && args1.payload != null && args1.payload.msgList instanceof Array && args1.payload.msgList[0].msgType == 5 && @@ -610,7 +611,8 @@ function onBrowserWindowCreated(window) { else if ( (args1.cmdName != null && args1.payload != null && - args1.cmdName.indexOf("onRecvMsg") != -1 && + (args1.cmdName.indexOf("onRecvMsg") != -1 || + args1.cmdName.indexOf("onRecvActiveMsg") != -1) && args1.payload.msgList instanceof Array) || (args1.cmdName.indexOf("onAddSendMsg") != -1 && args1.payload.msgRecord != null) || From d5455e1ad1be1d29c47456b145c233d80eb81b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E6=9C=89=E6=84=8F?= <48650471+CreepingG@users.noreply.github.com> Date: Sat, 23 Mar 2024 15:22:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E2=80=9C=E5=B7=B2=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E2=80=9D=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renderer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renderer.js b/renderer.js index d3f4b83..2afcb3f 100644 --- a/renderer.js +++ b/renderer.js @@ -637,6 +637,10 @@ async function onLoad() { arkElement.classList.add("recalledNoMargin"); await appendRecalledTag(arkElement.parentElement); } + else{ + var container = el.querySelector('.msg-content-container'); + if (container) await appendRecalledTag(container); + } } catch (e) { console.log("[Anti-Recall]", "反撤回消息时出错", e); } From 6a578b38563344a649bd29a0b09988b3664feeab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E6=9C=89=E6=84=8F?= <48650471+CreepingG@users.noreply.github.com> Date: Sat, 23 Mar 2024 15:36:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E2=80=9C=E5=B7=B2=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E2=80=9D=E6=A0=87=E7=A4=BA=EF=BC=8C=E5=8D=B3=E6=97=B6=E5=9B=9E?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renderer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderer.js b/renderer.js index 2afcb3f..74f39db 100644 --- a/renderer.js +++ b/renderer.js @@ -541,6 +541,9 @@ async function onLoad() { if (arkElement.classList.contains("gray-tip-message")) return; arkElement.classList.add("recalledNoMargin"); await appendRecalledTag(arkElement.parentElement); + } else{ + var container = document.querySelector(`.ml-item[id='${msgId}'] .msg-content-container`); + if (container) await appendRecalledTag(container); } }); //消息列表更新回调