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
35454820
Commit
35454820
authored
Apr 22, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #253
parent
66f46202
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt
...n/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt
+1
-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
+7
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
...mmonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
+14
-2
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt
...Main/kotlin/net.mamoe.mirai/message/data/MessageSource.kt
+1
-0
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt
View file @
35454820
...
...
@@ -313,6 +313,7 @@ internal abstract class QQAndroidBotBase constructor(
this
,
source
.
fromId
,
source
.
id
,
source
.
internalId
,
source
.
time
,
null
,
group
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt
View file @
35454820
...
...
@@ -381,7 +381,13 @@ internal class OnlinePush {
when
{
pkg
.
authorUin
==
bot
.
id
&&
operator
.
id
==
bot
.
id
->
null
else
->
{
MessageRecallEvent
.
GroupRecall
(
bot
,
pkg
.
authorUin
,
pkg
.
msgRandom
,
pkg
.
time
,
operator
,
group
)
MessageRecallEvent
.
GroupRecall
(
bot
,
pkg
.
authorUin
,
pkg
.
seq
,
pkg
.
msgRandom
,
pkg
.
time
,
operator
,
group
)
}
}
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
View file @
35454820
...
...
@@ -122,17 +122,25 @@ sealed class MessageRecallEvent : BotEvent {
*/
abstract
val
messageId
:
Int
/**
* 消息内部 id.
* @see MessageSource.id
*/
@SinceMirai
(
"0.39.0"
)
abstract
val
messageInternalId
:
Int
/**
* 原发送时间
*/
abstract
val
messageTime
:
Int
// seconds
/**
* 好友消息撤回事件, 暂不支持
解析
.
*/
* 好友消息撤回事件, 暂不支持.
*/
// TODO: 2020/4/22 支持好友消息撤回事件的解析和主动广播
data class
FriendRecall
(
override
val
bot
:
Bot
,
override
val
messageId
:
Int
,
override
val
messageInternalId
:
Int
,
override
val
messageTime
:
Int
,
/**
* 撤回操作人, 可能为 [Bot.uin] 或好友的 [QQ.id]
...
...
@@ -143,10 +151,14 @@ sealed class MessageRecallEvent : BotEvent {
get
()
=
bot
.
id
}
/**
* 群消息撤回事件.
*/
data class
GroupRecall
(
override
val
bot
:
Bot
,
override
val
authorId
:
Long
,
override
val
messageId
:
Int
,
override
val
messageInternalId
:
Int
,
override
val
messageTime
:
Int
,
/**
* 操作人. 为 null 时则为 [Bot] 操作.
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt
View file @
35454820
...
...
@@ -63,6 +63,7 @@ sealed class MessageSource : Message, MessageMetadata, ConstrainSingle<MessageSo
/**
* 内部 id, 仅用于 [Bot.constructMessageSource]
* 值没有顺序, 也可能为 0, 取决于服务器是否提供.
* 在事件中和在引用中无法保证同一条消息的 [internalId] 相同.
*
* 仅用于协议实现.
*/
...
...
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