Him188 5 роки тому
батько
коміт
26c81cb93b

+ 1 - 0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt

@@ -554,6 +554,7 @@ internal abstract class QQAndroidBotBase constructor(
                 time = time.toInt(),
                 random = Random.nextInt().absoluteValue.toUInt(),
                 groupCode = groupCode,
+                botId = [email protected],
                 botMemberNameCard = group.botAsMember.nameCardOrNick
             )
 

+ 2 - 1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/MultiMsg.kt

@@ -47,6 +47,7 @@ internal fun MessageChain.calculateValidationDataForGroup(
     time: Int,
     random: UInt,
     groupCode: Long,
+    botId: Long,
     botMemberNameCard: String
 ): MessageValidationData {
     val richTextElems = this.toRichTextElems(forGroup = true, withGeneralFlags = false)
@@ -55,7 +56,7 @@ internal fun MessageChain.calculateValidationDataForGroup(
         msg = listOf(
             MsgComm.Msg(
                 msgHead = MsgComm.MsgHead(
-                    fromUin = 1040400290,
+                    fromUin = botId,
                     msgSeq = sequenceId,
                     msgTime = time,
                     msgUid = 0x01000000000000000L or random.toLong(),