mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-30 10:50:18 +08:00
Remove debug information in StrangerList.kt (#809)
* Remove debug information in StrangerList.kt * Format
This commit is contained in:
parent
fce2ac469e
commit
2d5a37f220
@ -13,7 +13,6 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.OidbSso
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
@ -47,9 +46,7 @@ internal class StrangerList {
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||
readProtoBuf(OidbSso.OIDBSSOPkg.serializer()).let { pkg ->
|
||||
if (pkg.result == 0) {
|
||||
pkg.bodybuffer.loadAs(Oidb0x5d2.RspBody.serializer()).also {
|
||||
pkg._miraiContentToString()
|
||||
}.rspGetList!!.let {
|
||||
pkg.bodybuffer.loadAs(Oidb0x5d2.RspBody.serializer()).rspGetList!!.let {
|
||||
bot.client.strangerSeq = it.seq
|
||||
return Response(pkg.result, it.list)
|
||||
}
|
||||
@ -88,9 +85,7 @@ internal class StrangerList {
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||
readProtoBuf(OidbSso.OIDBSSOPkg.serializer()).let { pkg ->
|
||||
if (pkg.result == 0) {
|
||||
pkg.bodybuffer.loadAs(Oidb0x5d4.RspBody.serializer()).also {
|
||||
pkg._miraiContentToString()
|
||||
}.result.forEach { delResult ->
|
||||
pkg.bodybuffer.loadAs(Oidb0x5d4.RspBody.serializer()).result.forEach { delResult ->
|
||||
bot.getStranger(delResult.uin)?.let {
|
||||
bot.strangers.remove(delResult.uin)
|
||||
StrangerRelationChangeEvent.Deleted(it).broadcast()
|
||||
|
Loading…
Reference in New Issue
Block a user