Fix "Received: null"

This commit is contained in:
Him188 2020-02-19 21:00:46 +08:00
parent 3c29474c0b
commit 31adf3510e

View File

@ -412,7 +412,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
if (packet is CancellableEvent && packet.isCancelled) return
}
if (packet != null && bot.logger.isEnabled || logger.isEnabled) {
if (packet != null && (bot.logger.isEnabled || logger.isEnabled)) {
val logMessage = "Received: ${packet.toString().replace("\n", """\n""").replace("\r", "")}"
if (packet is Event) {