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
1d257e26
Commit
1d257e26
authored
Apr 15, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support operator in `GroupNameChangeEvent`, optimize logs
parent
991f46fe
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
26 deletions
+102
-26
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
...ain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
+1
-1
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
+87
-22
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
...mmonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
+10
-2
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
...c/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
+4
-1
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
View file @
1d257e26
...
...
@@ -120,7 +120,7 @@ internal class GroupImpl(
newName
=
newValue
).
sendWithoutExpect
()
}
GroupNameChangeEvent
(
oldValue
,
newValue
,
this
@GroupImpl
,
true
).
broadcast
()
GroupNameChangeEvent
(
oldValue
,
newValue
,
this
@GroupImpl
,
null
).
broadcast
()
}
}
}
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt
View file @
1d257e26
This diff is collapsed.
Click to expand it.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
View file @
1d257e26
...
...
@@ -301,8 +301,16 @@ data class GroupNameChangeEvent(
override
val
origin
:
String
,
override
val
new
:
String
,
override
val
group
:
Group
,
val
isByBot
:
Boolean
// 无法获取操作人
)
:
GroupSettingChangeEvent
<
String
>,
Packet
/**
* 操作人. 为 null 时则是机器人操作
*/
@SinceMirai
(
"0.37.3"
)
override
val
operator
:
Member
?
)
:
GroupSettingChangeEvent
<
String
>,
Packet
,
GroupOperableEvent
{
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
val
isByBot
:
Boolean
get
()
=
operator
==
null
}
/**
* 入群公告改变. 此事件广播前修改就已经完成.
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/types.kt
View file @
1d257e26
...
...
@@ -67,7 +67,10 @@ interface GroupOperableEvent : GroupEvent {
/**
* 是否由 [Bot] 操作
*/
val
GroupOperableEvent
.
isByBot
:
Boolean
get
()
=
operator
==
null
@Suppress
(
"INVISIBLE_REFERENCE"
,
"INVISIBLE_MEMBER"
)
@
kotlin
.
internal
.
HidesMembers
// necessary until 1.0.0
val
GroupOperableEvent
.
isByBot
:
Boolean
get
()
=
operator
==
null
/**
* 当操作人为 [Member] 时获取这个 [Member],
...
...
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