From 77eecaca34bcd718365720094b25b47b905c7d2a Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:27:32 +0900 Subject: [PATCH] [hotfix] token claim fixed. (2x) --- .../space/mori/chzzk_bot/chatbot/chzzk/ChzzkHandler.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/ChzzkHandler.kt b/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/ChzzkHandler.kt index 0883a10..3382842 100644 --- a/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/ChzzkHandler.kt +++ b/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/ChzzkHandler.kt @@ -224,7 +224,10 @@ class UserHandler( } try { val tokens = user.refreshToken?.let { token -> Connector.client.refreshAccessToken(token) } - client = Connector.getClient(tokens!!.first, tokens.second) + if(tokens == null) { + throw RuntimeException("AccessToken is not valid.") + } + client = Connector.getClient(tokens.first, tokens.second) UserService.setRefreshToken(user, tokens.first, tokens.second) chatChannelId = getChzzkChannelId(channel.channelId)