feat(live): 생성 결과 계약을 추가한다

This commit is contained in:
2026-07-15 21:26:53 +09:00
parent b582545991
commit c223b3b8a4
3 changed files with 220 additions and 0 deletions
@@ -0,0 +1,22 @@
package kr.co.vividnext.sodalive.v2.live.action
sealed interface LiveCreationResult {
data object Ignored : LiveCreationResult
data object Created : LiveCreationResult
data object RefreshOnly : LiveCreationResult
data class Enter(val roomId: Long) : LiveCreationResult
}
fun resolveLiveCreationResult(
isSuccessful: Boolean,
roomId: Long?,
channelName: String?
): LiveCreationResult = when {
!isSuccessful -> LiveCreationResult.Ignored
channelName == null -> LiveCreationResult.Created
roomId != null && roomId > 0L -> LiveCreationResult.Enter(roomId)
else -> LiveCreationResult.RefreshOnly
}