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
2f0ff513
Commit
2f0ff513
authored
Jul 15, 2020
by
ryoii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close #435, support FriendRecallEvent
parent
42716ab6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
...etwork/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
+42
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/message.kt
...commonMain/kotlin/net.mamoe.mirai/event/events/message.kt
+2
-2
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
View file @
2f0ff513
...
...
@@ -21,6 +21,7 @@ import kotlinx.io.core.discardExact
import
kotlinx.io.core.readBytes
import
kotlinx.io.core.readUInt
import
kotlinx.serialization.Serializable
import
kotlinx.serialization.protobuf.ProtoId
import
net.mamoe.mirai.JavaFriendlyAPI
import
net.mamoe.mirai.data.FriendInfo
import
net.mamoe.mirai.event.events.*
...
...
@@ -353,6 +354,47 @@ internal inline fun lambda528(crossinline block: MsgType0x210.(QQAndroidBot) ->
*/
internal
object
Transformers528
:
Map
<
Long
,
Lambda528
>
by
mapOf
(
0
x8AL
to
lambda528
{
bot
->
@Serializable
data class
Sub8AInner
(
@ProtoId
(
1
)
val
fromUin
:
Long
,
@ProtoId
(
2
)
val
botUin
:
Long
,
@ProtoId
(
3
)
val
srcId
:
Int
,
@ProtoId
(
4
)
val
srcInternalId
:
Int
,
@ProtoId
(
5
)
val
time
:
Int
,
@ProtoId
(
6
)
val
random
:
Int
,
// 同srcInternalId
@ProtoId
(
7
)
val
flag1
:
Boolean
,
// true
@ProtoId
(
8
)
val
flag2
:
Boolean
,
// false
@ProtoId
(
9
)
val
flag3
:
Boolean
,
// false
@ProtoId
(
12
)
val
flag4
:
Boolean
// true
)
:
ProtoBuf
@Serializable
data class
Sub8A
(
@ProtoId
(
1
)
val
inner
:
Sub8AInner
,
@ProtoId
(
2
)
val
v2
:
Boolean
,
// true
@ProtoId
(
3
)
val
v3
:
Boolean
,
// true
@ProtoId
(
4
)
val
v4
:
Boolean
,
// false
@ProtoId
(
5
)
val
v5
:
ByteArray
?
=
null
// struct{ boolean(1), boolean(2) }
)
:
ProtoBuf
val
sub8A
=
vProtobuf
.
loadAs
(
Sub8A
.
serializer
()).
inner
if
(
sub8A
.
botUin
==
bot
.
id
)
{
return
@
lambda528
sequenceOf
(
MessageRecallEvent
.
FriendRecall
(
bot
=
bot
,
messageId
=
sub8A
.
srcId
,
messageInternalId
=
sub8A
.
srcInternalId
,
messageTime
=
sub8A
.
time
,
operator
=
sub8A
.
fromUin
)
)
}
return
@
lambda528
emptySequence
()
},
// Network(1994701021) 16:03:54 : unknown group 528 type 0x0000000000000026, data: 08 01 12 40 0A 06 08 F4 EF BB 8F 04 10 E7 C1 AD B8 02 18 01 22 2C 10 01 1A 1A 18 B4 DC F8 9B 0C 20 E7 C1 AD B8 02 28 06 30 02 A2 01 04 08 93 D6 03 A8 01 08 20 00 28 00 32 08 18 01 20 FE AF AF F5 05 28 00
// VIP 进群提示
0
x26L
to
ignoredLambda528
,
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/message.kt
View file @
2f0ff513
...
...
@@ -296,14 +296,14 @@ sealed class MessageRecallEvent : BotEvent, AbstractEvent() {
/**
* 好友消息撤回事件, 暂不支持.
*/
// TODO: 2020/4/22 支持好友消息撤回事件的解析和主动广播
*/
data class
FriendRecall
internal
constructor
(
override
val
bot
:
Bot
,
override
val
messageId
:
Int
,
override
val
messageInternalId
:
Int
,
override
val
messageTime
:
Int
,
/**
* 撤回操作人,
可能为 [Bot.id] 或
好友的 [User.id]
* 撤回操作人, 好友的 [User.id]
*/
val
operator
:
Long
)
:
MessageRecallEvent
(),
Packet
{
...
...
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