From 56165c82aada76beb5f203ad8c0f859642ccb865 Mon Sep 17 00:00:00 2001 From: Him188 <Him188@mamoe.net> Date: Tue, 8 Jun 2021 12:00:20 +0800 Subject: [PATCH] Fix ignored friend message event logging, fix #1312 --- .../kotlin/network/components/PacketLoggingStrategy.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/network/components/PacketLoggingStrategy.kt b/mirai-core/src/commonMain/kotlin/network/components/PacketLoggingStrategy.kt index b77ee8d26..3b38558b2 100644 --- a/mirai-core/src/commonMain/kotlin/network/components/PacketLoggingStrategy.kt +++ b/mirai-core/src/commonMain/kotlin/network/components/PacketLoggingStrategy.kt @@ -52,7 +52,6 @@ internal class PacketLoggingStrategyImpl( if (packet is ParseErrorPacket) { packet.direction.getLogger(bot).error(packet.error) } - if (incomingPacket.commandName in blacklist) return if (incomingPacket.data is MultiPacket<*>) { for (d in incomingPacket.data) { logReceivedImpl(d, incomingPacket, logger) @@ -71,6 +70,7 @@ internal class PacketLoggingStrategyImpl( // "Event: $packet".replaceMagicCodes() // } // processed in global `Event.broadcast` else -> { + if (incomingPacket.commandName in blacklist) return if (SHOW_PACKET_DETAILS) { logger.verbose { "Recv: ${incomingPacket.commandName} ${incomingPacket.data}".replaceMagicCodes() } } else {