Fix member permission

This commit is contained in:
Him188 2020-01-25 21:41:40 +08:00
parent d1c56633b8
commit f2878e14ec
2 changed files with 3 additions and 3 deletions

View File

@ -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
) {

View File

@ -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