Improve ForceOfflineException.message: use canonical message tips

This commit is contained in:
Him188 2021-07-02 21:29:30 +08:00
parent 8647d38b34
commit ec5ad17ac4

View File

@ -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))
}
}