Skip to content

Commit 712d552

Browse files
committed
fix(fc/chat): only open chat stream if user Id established
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent d47bfdd commit 712d552

File tree

1 file changed

+1
-1
lines changed
  • services/flipchat/chat/src/main/kotlin/xyz/flipchat/services/internal/network/repository/chat

1 file changed

+1
-1
lines changed

services/flipchat/chat/src/main/kotlin/xyz/flipchat/services/internal/network/repository/chat/RealChatRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ internal class RealChatRepository @Inject constructor(
132132

133133
override fun openEventStream(coroutineScope: CoroutineScope, onEvent: (ChatDbUpdate) -> Unit) {
134134
val owner = userManager.keyPair ?: throw IllegalStateException("No keypair found for owner")
135-
val userId = userManager.userId
135+
val userId = userManager.userId ?: throw IllegalStateException("user not established")
136136
if (homeStreamReference == null) {
137137
homeStreamReference = service.openChatStream(coroutineScope, owner) { result ->
138138
if (result.isSuccess) {

0 commit comments

Comments
 (0)