mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-21 16:12:25 +08:00
Fix group message
This commit is contained in:
parent
5739f694c9
commit
a85b763f4e
@ -228,14 +228,14 @@ internal class MessageSvc {
|
||||
)
|
||||
),
|
||||
|
||||
//.apply { add(ImMsgBody.Elem(generalFlags = ImMsgBody.GeneralFlags(
|
||||
// pbReserve = "78 00 F8 01 00 C8 02 00".hexToBytes()
|
||||
// ))) }
|
||||
//
|
||||
//
|
||||
//
|
||||
msgSeq = seq,
|
||||
msgRand = Random.nextInt().absoluteValue//,
|
||||
// syncCookie = ByteArray(0)
|
||||
// ?: SyncCookie(time = currentTimeSeconds + client.timeDifference).toByteArray(SyncCookie.serializer()),
|
||||
// msgVia = 1
|
||||
, msgVia = 1
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package net.mamoe.mirai.qqandroid.utils
|
||||
import net.mamoe.mirai.data.ImageLink
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.utils.io.hexToBytes
|
||||
|
||||
internal fun NotOnlineImageFromFile.toJceData(): ImMsgBody.NotOnlineImage {
|
||||
return ImMsgBody.NotOnlineImage(
|
||||
@ -121,7 +122,13 @@ internal fun MessageChain.toRichTextElems(): MutableList<ImMsgBody.Elem> {
|
||||
is CustomFaceFromFile -> elements.add(ImMsgBody.Elem(customFace = it.toJceData()))
|
||||
is CustomFaceFromServer -> elements.add(ImMsgBody.Elem(customFace = it.delegate))
|
||||
is NotOnlineImageFromServer -> elements.add(ImMsgBody.Elem(notOnlineImage = it.delegate))
|
||||
is NotOnlineImageFromFile -> elements.add(ImMsgBody.Elem(notOnlineImage = it.toJceData()))
|
||||
is NotOnlineImageFromFile -> elements.add(
|
||||
ImMsgBody.Elem(
|
||||
notOnlineImage = it.toJceData(), generalFlags = ImMsgBody.GeneralFlags(
|
||||
pbReserve = "78 00 F8 01 00 C8 02 00".hexToBytes()
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user