diff --git a/build.gradle.kts b/build.gradle.kts index 9dd5c2c..ada4169 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,6 +32,7 @@ dependencies { compileOnly(kotlin("serialization", kotlinVersion)) implementation(kotlinx("serialization-cbor", kotlinSerializationVersion)) + implementation("ch.qos.logback:logback-classic:1.2.3") api(ktor("server-cio")) api(ktor("client-cio")) diff --git a/src/main/kotlin/tech/mihoyo/mirai/util/CQMessgeParser.kt b/src/main/kotlin/tech/mihoyo/mirai/util/CQMessgeParser.kt index 06b8fc4..1d92490 100644 --- a/src/main/kotlin/tech/mihoyo/mirai/util/CQMessgeParser.kt +++ b/src/main/kotlin/tech/mihoyo/mirai/util/CQMessgeParser.kt @@ -413,7 +413,7 @@ suspend fun tryResolveMedia(type: String, contact: Contact?, args: Map contact?.let { (it as Group).uploadVoice(stream) } } diff --git a/src/main/kotlin/tech/mihoyo/mirai/web/http/HttpApiModule.kt b/src/main/kotlin/tech/mihoyo/mirai/web/http/HttpApiModule.kt index 0301ff6..9b61af6 100644 --- a/src/main/kotlin/tech/mihoyo/mirai/web/http/HttpApiModule.kt +++ b/src/main/kotlin/tech/mihoyo/mirai/web/http/HttpApiModule.kt @@ -10,6 +10,7 @@ package tech.mihoyo.mirai.web.http import io.ktor.application.* +import io.ktor.features.* import io.ktor.http.* import io.ktor.request.* import io.ktor.response.* @@ -31,6 +32,7 @@ import java.nio.charset.Charset import kotlin.coroutines.EmptyCoroutineContext fun Application.cqHttpApiServer(session: BotSession, serviceConfig: HttpApiServerServiceConfig) { + install(CallLogging) // it.second -> if is async call routing { cqHttpApi("/send_msg", serviceConfig) {