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
3d6fe5a8
Commit
3d6fe5a8
authored
Mar 01, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Cmd0x858
parent
5e8662e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
7 deletions
+113
-7
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Cmd0x858.kt
...e/mirai/qqandroid/network/protocol/data/proto/Cmd0x858.kt
+95
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt
...ndroid/network/protocol/packet/chat/receive/OnlinePush.kt
+18
-7
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Cmd0x858.kt
0 → 100644
View file @
3d6fe5a8
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
Suppress
(
"SpellCheckingInspection"
)
package
net.mamoe.mirai.qqandroid.network.protocol.data.proto
import
kotlinx.serialization.SerialId
import
kotlinx.serialization.Serializable
import
kotlinx.serialization.protobuf.ProtoNumberType
import
kotlinx.serialization.protobuf.ProtoType
import
net.mamoe.mirai.qqandroid.io.ProtoBuf
import
net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
@Serializable
class
Oidb0x858
:
ProtoBuf
{
@Serializable
class
GoldMsgTipsElem
(
@SerialId
(
1
)
val
type
:
Int
=
0
,
@SerialId
(
2
)
val
billno
:
String
=
""
,
@SerialId
(
3
)
val
result
:
Int
=
0
,
@SerialId
(
4
)
val
amount
:
Int
=
0
,
@SerialId
(
5
)
val
total
:
Int
=
0
,
@SerialId
(
6
)
val
interval
:
Int
=
0
,
@SerialId
(
7
)
val
finish
:
Int
=
0
,
@SerialId
(
8
)
val
uin
:
List
<
Long
>?
=
null
,
@SerialId
(
9
)
val
action
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
MessageRecallReminder
(
@SerialId
(
1
)
val
uin
:
Long
=
0L
,
@SerialId
(
2
)
val
nickname
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
3
)
val
recalledMsgList
:
List
<
MessageMeta
>
=
listOf
(),
@SerialId
(
4
)
val
reminderContent
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
5
)
val
userdef
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
{
@Serializable
class
MessageMeta
(
@SerialId
(
1
)
val
seq
:
Int
=
0
,
@SerialId
(
2
)
val
time
:
Int
=
0
,
@SerialId
(
3
)
val
msgRandom
:
Int
=
0
)
:
ProtoBuf
}
@Serializable
class
NotifyMsgBody
(
@SerialId
(
1
)
val
optEnumType
:
Int
/* enum */
=
5
,
@SerialId
(
2
)
val
optUint64MsgTime
:
Long
=
0L
,
@SerialId
(
3
)
val
optUint64MsgExpires
:
Long
=
0L
,
@SerialId
(
4
)
val
optUint64ConfUin
:
Long
=
0L
,
@SerialId
(
5
)
val
optMsgRedtips
:
RedGrayTipsInfo
?
=
null
,
@SerialId
(
6
)
val
optMsgRecallReminder
:
MessageRecallReminder
?
=
null
,
@SerialId
(
7
)
val
optMsgObjUpdate
:
NotifyObjmsgUpdate
?
=
null
,
// @SerialId(8) val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null,
// @SerialId(9) val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null,
@SerialId
(
10
)
val
optMsgGoldtips
:
GoldMsgTipsElem
?
=
null
)
:
ProtoBuf
@Serializable
class
NotifyObjmsgUpdate
(
@SerialId
(
1
)
val
objmsgId
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
2
)
val
updateType
:
Int
=
0
,
@SerialId
(
3
)
val
extMsg
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
@Serializable
class
RedGrayTipsInfo
(
@SerialId
(
1
)
val
optUint32ShowLastest
:
Int
=
0
,
@SerialId
(
2
)
val
senderUin
:
Long
=
0L
,
@SerialId
(
3
)
val
receiverUin
:
Long
=
0L
,
@SerialId
(
4
)
val
senderRichContent
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
5
)
val
receiverRichContent
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
6
)
val
authkey
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoType
(
ProtoNumberType
.
SIGNED
)
@SerialId
(
7
)
val
sint32Msgtype
:
Int
=
0
,
@SerialId
(
8
)
val
luckyFlag
:
Int
=
0
,
@SerialId
(
9
)
val
hideFlag
:
Int
=
0
,
@SerialId
(
10
)
val
pcBody
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
11
)
val
icon
:
Int
=
0
,
@SerialId
(
12
)
val
luckyUin
:
Long
=
0L
,
@SerialId
(
13
)
val
time
:
Int
=
0
,
@SerialId
(
14
)
val
random
:
Int
=
0
,
@SerialId
(
15
)
val
broadcastRichContent
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
16
)
val
idiom
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
17
)
val
idiomSeq
:
Int
=
0
,
@SerialId
(
18
)
val
idiomAlpha
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
19
)
val
jumpurl
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
}
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt
View file @
3d6fe5a8
...
@@ -349,7 +349,9 @@ internal class OnlinePush {
...
@@ -349,7 +349,9 @@ internal class OnlinePush {
}
else
MessageRecallEvent
.
GroupRecall
(
}
else
MessageRecallEvent
.
GroupRecall
(
bot
,
bot
,
meta
.
authorUin
,
meta
.
authorUin
,
meta
.
seq
.
toLong
().
shl
(
32
)
or
meta
.
msgRandom
.
toLong
(),
meta
.
seq
.
toLong
().
shl
(
32
)
or
meta
.
msgRandom
.
toLong
().
and
(
0
xffffffff
),
meta
.
time
,
meta
.
time
,
group
.
get
(
recallReminder
.
uin
),
group
.
get
(
recallReminder
.
uin
),
group
group
...
@@ -387,12 +389,21 @@ internal class OnlinePush {
...
@@ -387,12 +389,21 @@ internal class OnlinePush {
}
}
}
}
}
}
528
->
{
bot
.
network
.
logger
.
debug
{
"unknown shtype ${msgInfo.shMsgType.toInt()}"
}
/* 528 -> {
// val content = msgInfo.vMsg.loadAs(OnlinePushPack.MsgType0x210.serializer())
val notifyMsgBody = msgInfo.vMsg.loadAs(Oidb0x858.NotifyMsgBody.serializer())
// println(content.contentToString())
notifyMsgBody.optMsgRecallReminder?.let { messageRecallReminder ->
return
@
flatMap
sequenceOf
()
return@flatMap messageRecallReminder.recalledMsgList.asSequence().map {
MessageRecallEvent.FriendRecall(
bot,
it.seq.toLong().shl(32) or it.msgRandom.toLong().and(0xffffffff),
it.time,
messageRecallReminder.uin
)
}
}
}
return@flatMap sequenceOf()
}*/
else
->
{
else
->
{
bot
.
network
.
logger
.
debug
{
"unknown shtype ${msgInfo.shMsgType.toInt()}"
}
bot
.
network
.
logger
.
debug
{
"unknown shtype ${msgInfo.shMsgType.toInt()}"
}
return
@
flatMap
sequenceOf
()
return
@
flatMap
sequenceOf
()
...
...
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