From 541422a43edfeec0307b7d9574c22d3b9714618c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E6=B1=A0?= Date: Tue, 27 Feb 2024 22:35:31 +0800 Subject: [PATCH] `Shamrock`: fix #260 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 白池 --- xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/MsgSvc.kt | 2 +- .../fuqiuluo/shamrock/remote/action/handlers/GetHistoryMsg.kt | 2 ++ .../java/moe/fuqiuluo/shamrock/remote/action/handlers/GetMsg.kt | 1 + .../java/moe/fuqiuluo/shamrock/remote/service/data/Message.kt | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/MsgSvc.kt b/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/MsgSvc.kt index 93451540..eb7f9a40 100644 --- a/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/MsgSvc.kt +++ b/xposed/src/main/java/moe/fuqiuluo/qqinterface/servlet/MsgSvc.kt @@ -98,7 +98,7 @@ internal object MsgSvc : BaseSvc() { } continuation.invokeOnCancellation { continuation.resume(null) - } // 貌似不会被取消,写了也没什么鸟用啊? + } } } diff --git a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetHistoryMsg.kt b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetHistoryMsg.kt index ba0027b8..86432710 100644 --- a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetHistoryMsg.kt +++ b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetHistoryMsg.kt @@ -70,6 +70,7 @@ internal object GetHistoryMsg : IActionHandler() { msgType = MessageHelper.obtainDetailTypeByMsgType(msg.chatType), msgId = msgHash, msgSeq = msg.msgSeq, + realId = msg.msgSeq, sender = MessageSender( msg.senderUin, msg.sendNickName, "unknown", 0, msg.senderUid, msg.senderUid ), @@ -92,6 +93,7 @@ internal object GetHistoryMsg : IActionHandler() { msgType = MessageHelper.obtainDetailTypeByMsgType(msg.chatType), msgId = MessageHelper.generateMsgIdHash(msg.chatType, msg.msgId), msgSeq = msg.msgSeq, + realId = msg.msgSeq, sender = MessageSender( msg.senderUin, msg.sendNickName .ifEmpty { msg.sendMemberName } diff --git a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetMsg.kt b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetMsg.kt index e23077e5..7657cafe 100644 --- a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetMsg.kt +++ b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/action/handlers/GetMsg.kt @@ -30,6 +30,7 @@ internal object GetMsg: IActionHandler() { msgType = MessageHelper.obtainDetailTypeByMsgType(msg.chatType), msgId = msgHash, msgSeq = msg.msgSeq, + realId = msg.msgSeq, sender = MessageSender( msg.senderUin, msg.sendNickName .ifEmpty { msg.sendMemberName } diff --git a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/service/data/Message.kt b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/service/data/Message.kt index 1f549133..4cf4bee7 100644 --- a/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/service/data/Message.kt +++ b/xposed/src/main/java/moe/fuqiuluo/shamrock/remote/service/data/Message.kt @@ -21,6 +21,7 @@ internal data class MessageDetail( @SerialName("message_type") val msgType: String, @SerialName("message_id") val msgId: Int, @SerialName("message_seq") val msgSeq: Long, + @SerialName("real_id") val realId: Long = msgSeq, @SerialName("sender") val sender: MessageSender, @SerialName("message") val message: List>, @SerialName("group_id") val groupId: Long = 0,