From 61a70f1d77512a28144200f8bfd04940b1536c87 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 25 Nov 2019 13:58:25 +0800 Subject: [PATCH] Add RequestFriendListPacket --- .../packet/action/RequestFriendListPacket.kt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/RequestFriendListPacket.kt diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/RequestFriendListPacket.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/RequestFriendListPacket.kt new file mode 100644 index 000000000..b3afd8689 --- /dev/null +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/RequestFriendListPacket.kt @@ -0,0 +1,29 @@ +@file:Suppress("EXPERIMENTAL_API_USAGE") + +package net.mamoe.mirai.network.protocol.tim.packet.action + +import kotlinx.io.core.ByteReadPacket +import net.mamoe.mirai.network.BotNetworkHandler +import net.mamoe.mirai.network.protocol.tim.TIMProtocol +import net.mamoe.mirai.network.protocol.tim.packet.* +import net.mamoe.mirai.utils.io.writeZero + +class FriendList : Packet + +@PacketVersion(date = "2019.11.24", timVersion = "2.3.2 (21173)") +object RequestFriendListPacket : SessionPacketFactory() { + operator fun invoke( + bot: UInt, + sessionKey: SessionKey + ): OutgoingPacket = buildSessionPacket( + bot, sessionKey, version = TIMProtocol.version0x02 + ) { + writeByte(0x02) + writeZero(4) + } + + override suspend fun ByteReadPacket.decode(id: PacketId, sequenceId: UShort, handler: BotNetworkHandler<*>): FriendList { + + TODO() + } +} \ No newline at end of file