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
15d89f2b
Commit
15d89f2b
authored
Feb 04, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build
parent
1a206612
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
...ommonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
+8
-10
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
View file @
15d89f2b
...
@@ -72,28 +72,26 @@ internal class MemberImpl(
...
@@ -72,28 +72,26 @@ internal class MemberImpl(
override
val
group
:
GroupImpl
by
group
.
unsafeWeakRef
()
override
val
group
:
GroupImpl
by
group
.
unsafeWeakRef
()
val
qq
:
QQImpl
by
qq
.
unsafeWeakRef
()
val
qq
:
QQImpl
by
qq
.
unsafeWeakRef
()
override
val
bot
:
QQAndroidBot
by
bot
.
unsafeWeakRef
()
override
suspend
fun
mute
(
durationSeconds
:
Int
):
Boolean
{
override
suspend
fun
mute
(
durationSeconds
:
Int
):
Boolean
{
if
(
bot
.
uin
==
this
@MemberImpl
.
qq
.
id
)
//不能自己禁言自己
if
(
bot
.
uin
==
this
@MemberImpl
.
qq
.
id
)
//不能自己禁言自己
{
{
return
false
return
false
}
}
//判断有无禁言权限
//判断有无禁言权限
va
r
myPermission
=
group
.
get
(
bot
.
uin
).
permission
va
l
myPermission
=
group
.
get
(
bot
.
uin
).
permission
if
(
myPermission
==
MemberPermission
.
ADMINISTRATOR
||
myPermission
==
MemberPermission
.
OWNER
)
{
if
(
myPermission
==
MemberPermission
.
ADMINISTRATOR
||
myPermission
==
MemberPermission
.
OWNER
)
{
if
(
myPermission
==
MemberPermission
.
OWNER
||
(
myPermission
==
MemberPermission
.
ADMINISTRATOR
&&
permission
==
MemberPermission
.
MEMBER
))
{
return
if
(
myPermission
==
MemberPermission
.
OWNER
||
(
myPermission
==
MemberPermission
.
ADMINISTRATOR
&&
permission
==
MemberPermission
.
MEMBER
))
{
bot
.
network
.
run
{
bot
.
network
.
run
{
val
response
=
TroopManagement
.
Mute
(
val
response
=
TroopManagement
.
Mute
(
client
=
bot
.
client
,
client
=
bot
.
client
,
member
=
this
@MemberImpl
,
memberUin
=
id
,
groupCode
=
group
.
id
,
timeInSecond
=
durationSeconds
timeInSecond
=
durationSeconds
).
sendAndExpect
<
TroopManagement
.
Mute
.
Response
>()
).
sendAndExpect
<
TroopManagement
.
Mute
.
Response
>()
}
}
return
true
true
}
else
{
}
else
{
return
false
false
}
}
}
else
{
}
else
{
return
false
return
false
...
...
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