mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 14:20:24 +08:00
Fix member permission
This commit is contained in:
parent
d1c56633b8
commit
f2878e14ec
@ -8,7 +8,7 @@ import net.mamoe.mirai.qqandroid.network.io.JceInput
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.jce.RequestPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.LoginPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.SvcReqRegisterPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.StatSvc
|
||||
import net.mamoe.mirai.utils.DefaultLogger
|
||||
import net.mamoe.mirai.utils.MiraiLogger
|
||||
import net.mamoe.mirai.utils.cryptor.adjustToPublicKey
|
||||
@ -50,7 +50,7 @@ internal val PacketLogger: MiraiLogger = DefaultLogger("Packet")
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
internal object KnownPacketFactories : List<PacketFactory<*>> by mutableListOf(
|
||||
LoginPacket,
|
||||
SvcReqRegisterPacket,
|
||||
StatSvc.Register,
|
||||
OnlinePush.PbPushGroupMsg
|
||||
) {
|
||||
|
||||
|
@ -59,7 +59,7 @@ internal class OnlinePush {
|
||||
permission = when {
|
||||
flags and 16 != 0 -> MemberPermission.ADMINISTRATOR
|
||||
flags and 8 != 0 -> MemberPermission.OWNER
|
||||
flags and 0 != 0 -> MemberPermission.MEMBER
|
||||
flags == 0 -> MemberPermission.MEMBER
|
||||
else -> {
|
||||
bot.logger.warning("判断群员权限失败")
|
||||
MemberPermission.MEMBER
|
||||
|
Loading…
Reference in New Issue
Block a user