From ec5ad17ac4b50fad3a1a1f5b2cf7d95813435e2b Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 2 Jul 2021 21:29:30 +0800 Subject: [PATCH] Improve `ForceOfflineException.message`: use canonical message tips --- .../protocol/packet/chat/receive/MessageSvc.PushForceOffline.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PushForceOffline.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PushForceOffline.kt index 42ae5b282..138f3de3b 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PushForceOffline.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PushForceOffline.kt @@ -32,6 +32,6 @@ internal object MessageSvcPushForceOffline : override suspend fun QQAndroidBot.handle(packet: RequestPushForceOffline) { components[AccountSecretsManager].invalidate() // otherwise you receive `MessageSvc.PushForceOffline` again just after logging in. components[BotInitProcessor].setLoginHalted() // so that BotInitProcessor will be run on successful reconnection. - network.close(ForceOfflineException(packet.title, "Closed by MessageSvc.PushForceOffline: $packet")) + network.close(ForceOfflineException(packet.title, packet.tips)) } }