From 3ba2510f10b756ae18abfc49e2beda2b9685dd8e Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Tue, 16 Feb 2021 21:07:43 +0800 Subject: [PATCH] Update permission flags; close #1013 --- .../packet/chat/receive/OnlinePush.PbPushGroupMsg.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.PbPushGroupMsg.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.PbPushGroupMsg.kt index 4b351520b..444bedc17 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.PbPushGroupMsg.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.PbPushGroupMsg.kt @@ -156,7 +156,11 @@ internal object OnlinePushPbPushGroupMsg : IncomingPacketFactory("Onlin ) = when { flags and 16 != 0 -> MemberPermission.ADMINISTRATOR flags and 8 != 0 -> MemberPermission.OWNER - flags == 0 || flags == 1 -> MemberPermission.MEMBER + (when (flags) { + 1, 0, 64, + -> true + else -> false + }) -> MemberPermission.MEMBER else -> { bot.logger.warning { "判断群 ${sender.group.id} 的群员 ${sender.id} 的权限失败: ${flags._miraiContentToString()}. 请完整截图或复制此日志并确认其真实权限后发送给 mirai 维护者以帮助解决问题." } sender.permission