From 90e09d4b2db2e8b60add32631b536c41621119ef Mon Sep 17 00:00:00 2001 From: ACh Sulfate Date: Tue, 12 Dec 2023 21:35:48 +0800 Subject: [PATCH] chore: RevokeMsgHook: reduce log --- app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java b/app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java index cc4d0bae3b..6a80fbe0c2 100644 --- a/app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java +++ b/app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java @@ -429,7 +429,7 @@ private void onRecallSysMsgForNT(int chatType, String peerUid, String recallOpUi Log.e("onRecallSysMsgForNT fatal: msgAuthorUid is empty"); return; } - if ((chatType == 1 && !Objects.equals(selfUid, toUid)) || (chatType == 2 && !Objects.equals(peerUid, toUid))) { + if (chatType == 2 && !Objects.equals(peerUid, toUid)) { Log.w("!!! onRecallSysMsgForNT potential bug: chatType=" + chatType + ", peerUid=" + peerUid + ", toUid=" + toUid + ", selfUid=" + selfUid); } Contact contact = new Contact(chatType, peerUid, ""); @@ -461,8 +461,11 @@ private void onRecallSysMsgForNT(int chatType, String peerUid, String recallOpUi } summary = revokerPron + "尝试撤回一条消息"; } else if (msgObject != null && (msgObject.getMsgType() == 5 && msgObject.getSubMsgType() == 4)) { + // Case 1: // C2C only: msg not actually received, system message: "对方撤回了一条消息" // We don't need to do anything here, otherwise we will have duplicated gray tip. + // Case 2: + // The current user itself have revoked a msg. No extra action is required. return; } else { builder.appendText(revokerPron + "撤回了一条消息(没收到) [msgId=" + msgUid + ", seq=" + msgSeq + ", cseq=" + msgClientSeq + "]");