This commit is contained in:
Karlatemp 2020-10-15 18:16:15 +08:00
parent 1935352ae6
commit 521f928926
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ import net.mamoe.mirai.console.permission.AbstractPermitteeId.*
internal fun parseFromStringImpl(string: String): AbstractPermitteeId {
val str = string.trim { it.isWhitespace() }.toLowerCase()
if (str == "*") return AnyContact
if (str == "console") return Console
if (str.isNotEmpty()) {
when (str[0]) {

View File

@ -266,13 +266,13 @@ public sealed class AbstractPermitteeId(
/**
* 表示唯一的一个好友
*
* - **直接父标识符**: [ExactUser]
* - **直接父标识符**: [ExactUser], [AnyFriend]
* - **间接父标识符**: [AnyUser], [AnyContact]
* - 字符串表示: "f$id"
*/
public data class ExactFriend(
public val id: Long,
) : AbstractPermitteeId(ExactUser(id)) {
) : AbstractPermitteeId(ExactUser(id), AnyFriend) {
override fun asString(): String = "f$id"
}
@ -304,7 +304,7 @@ public sealed class AbstractPermitteeId(
* 表示唯一的一个 *在临时会话发送消息的* [群成员][Member]
*
* - **直接父标识符**: [ExactMember]
* - **间接父标识符**: [AnyUser], [AnyMember], [ExactUser], [AnyContact]
* - **间接父标识符**: [AnyUser], [AnyMember], [ExactUser], [AnyContact], [AnyMemberFromAnyGroup]
* - 字符串表示: "t$groupId.$memberId"
*/
public data class ExactTemp(