diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/chat/quota/ChatQuotaService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/chat/quota/ChatQuotaService.kt index 6309957..1e3ba87 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/chat/quota/ChatQuotaService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/chat/quota/ChatQuotaService.kt @@ -12,7 +12,7 @@ class ChatQuotaService( ) { companion object { private const val FREE_BUCKET = 10 - private const val RECHARGE_HOURS = 6L + private const val RECHARGE_HOURS = 1L } data class QuotaStatus( @@ -41,20 +41,20 @@ class ChatQuotaService( quota.remainingFree > 0 -> { quota.remainingFree -= 1 if (quota.remainingFree + quota.remainingPaid == 0 && quota.nextRechargeAt == null) { - quota.nextRechargeAt = now.plusHours(RECHARGE_HOURS) + quota.nextRechargeAt = now.plusMinutes(RECHARGE_HOURS) } } quota.remainingPaid > 0 -> { quota.remainingPaid -= 1 if (quota.remainingFree + quota.remainingPaid == 0 && quota.nextRechargeAt == null) { - quota.nextRechargeAt = now.plusHours(RECHARGE_HOURS) + quota.nextRechargeAt = now.plusMinutes(RECHARGE_HOURS) } } else -> { if (quota.nextRechargeAt == null) { - quota.nextRechargeAt = now.plusHours(RECHARGE_HOURS) + quota.nextRechargeAt = now.plusMinutes(RECHARGE_HOURS) } throw SodaException("채팅 가능 횟수가 모두 소진되었습니다. 다음 무료 충전 이후 이용해주세요.") }