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
5dc0475a
Commit
5dc0475a
authored
Mar 24, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc improvements
parent
83793d3f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
19 deletions
+17
-19
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
...ain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
+3
-3
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
+6
-6
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/GroupActiveData.kt
...commonMain/kotlin/net.mamoe.mirai/data/GroupActiveData.kt
+3
-4
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/lowLevelApi.kt
...core/src/commonMain/kotlin/net.mamoe.mirai/lowLevelApi.kt
+5
-6
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
View file @
5dc0475a
...
@@ -39,11 +39,11 @@ import kotlin.coroutines.CoroutineContext
...
@@ -39,11 +39,11 @@ import kotlin.coroutines.CoroutineContext
import
kotlin.jvm.JvmSynthetic
import
kotlin.jvm.JvmSynthetic
@OptIn
(
ExperimentalContracts
::
class
)
@OptIn
(
ExperimentalContracts
::
class
)
internal
fun
GroupImpl
.
Companion
.
checkIsInstance
(
expression
:
Boolean
)
{
internal
fun
GroupImpl
.
Companion
.
checkIsInstance
(
instance
:
Group
)
{
contract
{
contract
{
returns
()
implies
expression
returns
()
implies
(
instance
is
GroupImpl
)
}
}
check
(
expression
)
{
"group is not an instanceof GroupImpl!! DO NOT interlace two or more protocol implementations!!"
}
check
(
instance
is
GroupImpl
)
{
"group is not an instanceof GroupImpl!! DO NOT interlace two or more protocol implementations!!"
}
}
}
@Suppress
(
"PropertyName"
)
@Suppress
(
"PropertyName"
)
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt
View file @
5dc0475a
...
@@ -197,7 +197,7 @@ internal class OnlinePush {
...
@@ -197,7 +197,7 @@ internal class OnlinePush {
when
(
msgInfo
.
shMsgType
.
toInt
())
{
when
(
msgInfo
.
shMsgType
.
toInt
())
{
732
->
{
732
->
{
val
group
=
bot
.
getGroup
(
this
.
readUInt
().
toLong
())
val
group
=
bot
.
getGroup
(
this
.
readUInt
().
toLong
())
GroupImpl
.
checkIsInstance
(
group
is
GroupImpl
)
GroupImpl
.
checkIsInstance
(
group
)
when
(
val
internalType
=
this
.
readByte
().
toInt
().
also
{
this
.
discardExact
(
1
)
})
{
when
(
val
internalType
=
this
.
readByte
().
toInt
().
also
{
this
.
discardExact
(
1
)
})
{
0
x0c
->
{
// mute
0
x0c
->
{
// mute
...
@@ -215,7 +215,7 @@ internal class OnlinePush {
...
@@ -215,7 +215,7 @@ internal class OnlinePush {
if
(
time
==
0
)
{
if
(
time
==
0
)
{
return
@
flatMap
sequenceOf
(
return
@
flatMap
sequenceOf
(
GroupMuteAllEvent
(
GroupMuteAllEvent
(
origin
=
group
.
isMuteAll
.
also
{
group
.
_muteAll
=
false
},
origin
=
group
.
settings
.
isMuteAll
.
also
{
group
.
_muteAll
=
false
},
new
=
false
,
new
=
false
,
operator
=
operator
,
operator
=
operator
,
group
=
group
group
=
group
...
@@ -224,7 +224,7 @@ internal class OnlinePush {
...
@@ -224,7 +224,7 @@ internal class OnlinePush {
}
else
{
}
else
{
return
@
flatMap
sequenceOf
(
return
@
flatMap
sequenceOf
(
GroupMuteAllEvent
(
GroupMuteAllEvent
(
origin
=
group
.
isMuteAll
.
also
{
group
.
_muteAll
=
true
},
origin
=
group
.
settings
.
isMuteAll
.
also
{
group
.
_muteAll
=
true
},
new
=
true
,
new
=
true
,
operator
=
operator
,
operator
=
operator
,
group
=
group
group
=
group
...
@@ -283,7 +283,7 @@ internal class OnlinePush {
...
@@ -283,7 +283,7 @@ internal class OnlinePush {
val
switch
=
this
.
readInt
()
==
0
val
switch
=
this
.
readInt
()
==
0
return
@
flatMap
sequenceOf
(
return
@
flatMap
sequenceOf
(
GroupAllowAnonymousChatEvent
(
GroupAllowAnonymousChatEvent
(
origin
=
group
.
isAnonymousChatEnabled
.
also
{
origin
=
group
.
settings
.
isAnonymousChatEnabled
.
also
{
group
.
_anonymousChat
=
switch
group
.
_anonymousChat
=
switch
},
},
new
=
switch
,
new
=
switch
,
...
@@ -312,7 +312,7 @@ internal class OnlinePush {
...
@@ -312,7 +312,7 @@ internal class OnlinePush {
"管理员已关闭群聊坦白说"
->
{
"管理员已关闭群聊坦白说"
->
{
return
@
flatMap
sequenceOf
(
return
@
flatMap
sequenceOf
(
GroupAllowConfessTalkEvent
(
GroupAllowConfessTalkEvent
(
origin
=
group
.
isConfessTalkEnabled
.
also
{
origin
=
group
.
settings
.
isConfessTalkEnabled
.
also
{
group
.
_confessTalk
=
false
group
.
_confessTalk
=
false
},
},
new
=
false
,
new
=
false
,
...
@@ -324,7 +324,7 @@ internal class OnlinePush {
...
@@ -324,7 +324,7 @@ internal class OnlinePush {
"管理员已开启群聊坦白说"
->
{
"管理员已开启群聊坦白说"
->
{
return
@
flatMap
sequenceOf
(
return
@
flatMap
sequenceOf
(
GroupAllowConfessTalkEvent
(
GroupAllowConfessTalkEvent
(
origin
=
group
.
isConfessTalkEnabled
.
also
{
origin
=
group
.
settings
.
isConfessTalkEnabled
.
also
{
group
.
_confessTalk
=
true
group
.
_confessTalk
=
true
},
},
new
=
true
,
new
=
true
,
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/GroupActiveData.kt
View file @
5dc0475a
...
@@ -3,14 +3,13 @@ package net.mamoe.mirai.data
...
@@ -3,14 +3,13 @@ package net.mamoe.mirai.data
import
kotlinx.serialization.SerialName
import
kotlinx.serialization.SerialName
import
kotlinx.serialization.Serializable
import
kotlinx.serialization.Serializable
import
net.mamoe.mirai.utils.SinceMirai
/**
/**
* 群统计信息
* 群统计信息
*
*/
*
@SinceMirai
(
"0.28.0"
)
* */
@Serializable
@Serializable
data class
GroupActiveData
(
data class
GroupActiveData
(
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/lowLevelApi.kt
View file @
5dc0475a
...
@@ -97,7 +97,7 @@ interface LowLevelBotAPIAccessor {
...
@@ -97,7 +97,7 @@ interface LowLevelBotAPIAccessor {
/**
/**
* 获取群公告列表
* 获取群公告列表
* @param page 页码
* @param page 页码
*
*
/
*/
@SinceMirai
(
"0.28.0"
)
@SinceMirai
(
"0.28.0"
)
@LowLevelAPI
@LowLevelAPI
@MiraiExperimentalAPI
@MiraiExperimentalAPI
...
@@ -107,7 +107,7 @@ interface LowLevelBotAPIAccessor {
...
@@ -107,7 +107,7 @@ interface LowLevelBotAPIAccessor {
* 发送群公告
* 发送群公告
*
*
* @return 公告的fid
* @return 公告的fid
*
*
/
*/
@SinceMirai
(
"0.28.0"
)
@SinceMirai
(
"0.28.0"
)
@LowLevelAPI
@LowLevelAPI
@MiraiExperimentalAPI
@MiraiExperimentalAPI
...
@@ -117,7 +117,7 @@ interface LowLevelBotAPIAccessor {
...
@@ -117,7 +117,7 @@ interface LowLevelBotAPIAccessor {
/**
/**
* 删除群公告
* 删除群公告
* @param fid [GroupAnnouncement.fid]
* @param fid [GroupAnnouncement.fid]
*
*
/
*/
@SinceMirai
(
"0.28.0"
)
@SinceMirai
(
"0.28.0"
)
@LowLevelAPI
@LowLevelAPI
@MiraiExperimentalAPI
@MiraiExperimentalAPI
...
@@ -126,7 +126,7 @@ interface LowLevelBotAPIAccessor {
...
@@ -126,7 +126,7 @@ interface LowLevelBotAPIAccessor {
/**
/**
* 获取一条群公告
* 获取一条群公告
* @param fid [GroupAnnouncement.fid]
* @param fid [GroupAnnouncement.fid]
*
*
/
*/
@SinceMirai
(
"0.28.0"
)
@SinceMirai
(
"0.28.0"
)
@LowLevelAPI
@LowLevelAPI
@MiraiExperimentalAPI
@MiraiExperimentalAPI
...
@@ -135,8 +135,7 @@ interface LowLevelBotAPIAccessor {
...
@@ -135,8 +135,7 @@ interface LowLevelBotAPIAccessor {
/**
/**
* 获取群活跃信息
* 获取群活跃信息
*
*/
* */
@LowLevelAPI
@LowLevelAPI
@MiraiExperimentalAPI
@MiraiExperimentalAPI
suspend
fun
_lowLevelGetGroupActiveData
(
groupId
:
Long
):
GroupActiveData
suspend
fun
_lowLevelGetGroupActiveData
(
groupId
:
Long
):
GroupActiveData
...
...
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