Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
fdef3bdb
Commit
fdef3bdb
authored
Apr 11, 2020
by
Him188
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
770c5cd5
cd0b27e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/PbMessageSvc.kt
...ai/qqandroid/network/protocol/packet/chat/PbMessageSvc.kt
+10
-5
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/PbMessageSvc.kt
View file @
fdef3bdb
...
...
@@ -20,6 +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.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
...
...
@@ -92,13 +93,15 @@ internal class PbMessageSvc {
fromUin
=
client
.
bot
.
id
,
toUin
=
toUin
,
msgSeq
=
messageSequenceId
,
msgUid
=
0
x0100000000000000L
or
messageRandom
.
toLong
().
and
(
0
xFFFF_FFFF
),
msgRandom
=
messageRandom
,
msgUid
=
0
x0100000000000000
or
(
messageRandom
.
toLong
()
and
0
xFFFFFFFF
),
msgTime
=
time
.
toLong
(),
routingHead
=
MsgSvc
.
RoutingHead
(
grpTmp
=
MsgSvc
.
GrpTmp
(
groupUin
,
toUin
)
)
)
)
),
reserved
=
"08 01 10 E3 E9 D6 80 02"
.
hexToBytes
()
)
)
)
...
...
@@ -123,7 +126,8 @@ internal class PbMessageSvc {
fromUin
=
client
.
bot
.
id
,
toUin
=
toUin
,
msgSeq
=
messageSequenceId
,
msgUid
=
0
x1000000000000000L
or
messageRandom
.
toLong
().
and
(
0
xFFFF_FFFF
),
msgRandom
=
messageRandom
,
msgUid
=
0
x0100000000000000
or
(
messageRandom
.
toLong
()
and
0
xFFFFFFFF
),
msgTime
=
time
.
toLong
(),
routingHead
=
MsgSvc
.
RoutingHead
(
c2c
=
MsgSvc
.
C2C
(
...
...
@@ -131,7 +135,8 @@ internal class PbMessageSvc {
)
)
)
)
),
reserved
=
"08 00"
.
hexToBytes
()
)
)
)
...
...
@@ -147,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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment