Merge branch 'master' of github.com:whitechi73/OpenShamrock

This commit is contained in:
ikechan8370 2023-12-01 15:22:04 +08:00
commit 007e5fef2f

View File

@ -33,16 +33,21 @@ internal class InitRemoteService : IAction {
if (!PlatformUtils.isMqqPackage()) return if (!PlatformUtils.isMqqPackage()) return
if (ShamrockConfig.allowWebHook()) { if (ShamrockConfig.allowWebHook()) {
HttpService.initTransmitter() HttpService.initTransmitter()
} }
val runtime = AppRuntimeFetcher.appRuntime
if (!runtime.isLogin) {
LogCenter.log("未登录不启动任何WebSocket服务登录完成后请重新启动QQ。", Level.WARN)
return
}
if (ShamrockConfig.openWebSocket()) { if (ShamrockConfig.openWebSocket()) {
startWebSocketServer() startWebSocketServer()
} }
if (ShamrockConfig.openWebSocketClient()) { if (ShamrockConfig.openWebSocketClient()) {
val runtime = AppRuntimeFetcher.appRuntime
val curUin = runtime.currentAccountUin val curUin = runtime.currentAccountUin
val defaultToken = ShamrockConfig.getToken() val defaultToken = ShamrockConfig.getToken()
ShamrockConfig.getWebSocketClientAddress().forEach { conn -> ShamrockConfig.getWebSocketClientAddress().forEach { conn ->