Fix longMessage

This commit is contained in:
Him188 2020-04-13 20:44:17 +08:00
parent bb6cac3261
commit 26c81cb93b
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -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(),