mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Fix temp message and friend message recall
This commit is contained in:
parent
3f1221699d
commit
28108a36ae
@ -20,7 +20,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.qqandroid.utils._miraiContentToString
|
||||
import net.mamoe.mirai.qqandroid.utils.hexToBytes
|
||||
import net.mamoe.mirai.qqandroid.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.qqandroid.utils.io.serialization.writeProtoBuf
|
||||
@ -93,13 +93,15 @@ internal class PbMessageSvc {
|
||||
fromUin = client.bot.id,
|
||||
toUin = toUin,
|
||||
msgSeq = messageSequenceId,
|
||||
msgUid = 1000000000000000000L or messageRandom.toULong().toLong(),
|
||||
msgRandom = messageRandom,
|
||||
msgUid = 0x0100000000000000 or (messageRandom.toLong() and 0xFFFFFFFF),
|
||||
msgTime = time.toLong(),
|
||||
routingHead = MsgSvc.RoutingHead(
|
||||
grpTmp = MsgSvc.GrpTmp(groupUin, toUin)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
reserved = "08 01 10 E3 E9 D6 80 02".hexToBytes()
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -124,7 +126,8 @@ internal class PbMessageSvc {
|
||||
fromUin = client.bot.id,
|
||||
toUin = toUin,
|
||||
msgSeq = messageSequenceId,
|
||||
msgUid = 1000000000000000000L or messageRandom.toULong().toLong(),
|
||||
msgRandom = messageRandom,
|
||||
msgUid = 0x0100000000000000 or (messageRandom.toLong() and 0xFFFFFFFF),
|
||||
msgTime = time.toLong(),
|
||||
routingHead = MsgSvc.RoutingHead(
|
||||
c2c = MsgSvc.C2C(
|
||||
@ -132,7 +135,8 @@ internal class PbMessageSvc {
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
reserved = "08 00".hexToBytes()
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -148,7 +152,7 @@ internal class PbMessageSvc {
|
||||
return Response.Success
|
||||
}
|
||||
resp.c2cWithDraw?.firstOrNull()?.let {
|
||||
if (it.result != 0) {
|
||||
if (it.result != 2 && it.result != 3) {
|
||||
return Response.Failed(it.result, it.errmsg)
|
||||
}
|
||||
return Response.Success
|
||||
|
Loading…
Reference in New Issue
Block a user