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
1db7bba8
Commit
1db7bba8
authored
May 11, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make FriendEvent.bot final
parent
5be7f2bb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
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
+2
-2
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
...mmonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
+5
-10
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
...c/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
+3
-2
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
View file @
1db7bba8
...
...
@@ -411,7 +411,7 @@ internal object Transformers528 : Map<Long, Lambda528> by mapOf(
return
this
.
msgFrdRmk
?.
asSequence
()
?.
mapNotNull
{
val
friend
=
bot
.
getFriendOrNull
(
it
.
fuin
)
?:
return
@
mapNotNull
null
// TODO: 2020/4/10 ADD REMARK QUERY
FriendRemarkChangeEvent
(
bot
,
friend
,
it
.
rmkName
)
FriendRemarkChangeEvent
(
friend
,
it
.
rmkName
)
}
?:
emptySequence
()
}
...
...
@@ -519,7 +519,7 @@ internal object Transformers528 : Map<Long, Lambda528> by mapOf(
return
sequenceOf
(
BotAvatarChangedEvent
(
bot
))
}
val
friend
=
bot
.
getFriendOrNull
(
uin
)
?:
return
emptySequence
()
return
sequenceOf
(
Friend
Face
ChangedEvent
(
friend
))
return
sequenceOf
(
Friend
Avatar
ChangedEvent
(
friend
))
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
View file @
1db7bba8
...
...
@@ -83,7 +83,7 @@ sealed class BotOfflineEvent : BotEvent, AbstractEvent() {
}
/**
* [Bot] 主动或被动重新登录.
* [Bot] 主动或被动重新登录.
在此事件广播前就已经登录完毕.
*/
data class
BotReloginEvent
internal
constructor
(
override
val
bot
:
Bot
,
...
...
@@ -91,14 +91,14 @@ data class BotReloginEvent internal constructor(
)
:
BotEvent
,
BotActiveEvent
,
AbstractEvent
()
/**
* [Bot] 头像被修改(通过其他客户端修改了
Bot的头像)
* [Bot] 头像被修改(通过其他客户端修改了
头像). 在此事件广播前就已经修改完毕.
*/
data class
BotAvatarChangedEvent
(
override
val
bot
:
Bot
)
:
BotEvent
,
Packet
,
AbstractEvent
()
/**
* [Friend] 头像被修改
* [Friend] 头像被修改
. 在此事件广播前就已经修改完毕.
*/
data class
FriendAvatarChangedEvent
(
override
val
friend
:
Friend
...
...
@@ -658,7 +658,6 @@ data class MemberUnmuteEvent(
* 好友昵称改变事件. 目前仅支持解析 (来自 PC 端的修改).
*/
data class
FriendRemarkChangeEvent
(
override
val
bot
:
Bot
,
override
val
friend
:
Friend
,
val
newName
:
String
)
:
FriendEvent
,
Packet
,
AbstractEvent
()
...
...
@@ -671,18 +670,14 @@ data class FriendAddEvent(
* 新好友. 已经添加到 [Bot.friends]
*/
override
val
friend
:
Friend
)
:
FriendEvent
,
Packet
,
AbstractEvent
()
{
override
val
bot
:
Bot
get
()
=
friend
.
bot
}
)
:
FriendEvent
,
Packet
,
AbstractEvent
()
/**
* 好友已被删除的事件.
*/
data class
FriendDeleteEvent
(
override
val
friend
:
Friend
)
:
FriendEvent
,
Packet
,
AbstractEvent
()
{
override
val
bot
:
Bot
get
()
=
friend
.
bot
}
)
:
FriendEvent
,
Packet
,
AbstractEvent
()
/**
* 一个账号请求添加机器人为好友的事件
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
View file @
1db7bba8
...
...
@@ -7,6 +7,8 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
Suppress
(
"WRONG_MODIFIER_CONTAINING_DECLARATION"
)
package
net.mamoe.mirai.event.events
import
net.mamoe.mirai.Bot
...
...
@@ -84,6 +86,5 @@ val GroupOperableEvent.operatorOrBot: Member
*/
interface
FriendEvent
:
BotEvent
{
val
friend
:
Friend
override
val
bot
:
Bot
get
()
=
friend
.
bot
final
override
val
bot
:
Bot
get
()
=
friend
.
bot
}
\ No newline at end of file
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