Merge pull request #130 from dalbodeule/develop

[feature] timer debugs.
This commit is contained in:
JinU Choi 2025-05-18 09:27:14 +09:00 committed by GitHub
commit 7257100adc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,6 +237,26 @@ class UserHandler(
listener.on(SessionChatMessageEvent::class.java) {
messageHandler.handle(it.message, user)
}
GlobalScope.launch {
val timer = TimerConfigService.getConfig(user)
if (timer?.option == TimerType.UPTIME.value)
dispatcher.post(
TimerEvent(
channel.channelId,
TimerType.UPTIME,
getUptime(streamStartTime!!)
)
)
else dispatcher.post(
TimerEvent(
channel.channelId,
TimerType.entries.firstOrNull { it.value == timer?.option } ?: TimerType.REMOVE,
null
)
)
}
} catch(e: Exception) {
logger.error("Exception(${user.username}): ${e.stackTraceToString()}")
throw RuntimeException("Exception: ${e.stackTraceToString()}")