mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Update permission flags; close #1013
This commit is contained in:
parent
2bfc20048e
commit
3ba2510f10
@ -156,7 +156,11 @@ internal object OnlinePushPbPushGroupMsg : IncomingPacketFactory<Packet?>("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
|
||||
|
Loading…
Reference in New Issue
Block a user