Merge pull request #28 from dalbodeule/develop

some debugs on WSTimerRoutes.kt
This commit is contained in:
JinU Choi 2024-08-04 15:50:30 +09:00 committed by GitHub
commit 2f73204c6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ import kotlinx.serialization.Serializable
import org.koin.java.KoinJavaComponent.inject
import org.slf4j.LoggerFactory
import space.mori.chzzk_bot.common.events.*
import space.mori.chzzk_bot.common.services.TimerConfigService
import space.mori.chzzk_bot.common.services.UserService
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentLinkedQueue
@ -49,6 +50,13 @@ fun Routing.wsTimerRoutes() {
CoroutineScope(Dispatchers.Default).launch {
sendSerialized(TimerResponse(TimerType.STREAM_OFF.value, null))
}
} else {
CoroutineScope(Dispatchers.Default).launch {
sendSerialized(TimerResponse(
TimerConfigService.getConfig(user)?.option ?: TimerType.STREAM_OFF.value,
null
))
}
}
try {