Commit abfa13c2 authored by Him188's avatar Him188

Add permission check

parent fa515ed3
...@@ -322,6 +322,7 @@ internal class GroupImpl( ...@@ -322,6 +322,7 @@ internal class GroupImpl(
override var botPermission: MemberPermission = MemberPermission.MEMBER override var botPermission: MemberPermission = MemberPermission.MEMBER
override suspend fun quit(): Boolean { override suspend fun quit(): Boolean {
check(botPermission != MemberPermission.OWNER) { "An owner cannot quit from a owning group" }
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment