Skip to content

Commit

Permalink
chore: RevokeMsgHook: reduce log
Browse files Browse the repository at this point in the history
  • Loading branch information
cinit committed Dec 12, 2023
1 parent 2167bd9 commit 90e09d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/cc/ioctl/hook/msg/RevokeMsgHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down Expand Up @@ -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 + "]");
Expand Down

0 comments on commit 90e09d4

Please sign in to comment.