File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
data/src/main/java/com/idle/data/repository
network/src/main/java/com/idle/network/source Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ class ChatRepositoryImpl @Inject constructor(
7575 myId = myId,
7676 lastMessageId = messageId
7777 )
78-
7978 override suspend fun getChatRoomMessages (
8079 userType : UserType ,
8180 roomId : String ,
@@ -152,7 +151,6 @@ class ChatRepositoryImpl @Inject constructor(
152151 return chatDataSource.subscribeChatMessage(userId)
153152 .map { response ->
154153 val message = response.toVO()
155-
156154 when (message) {
157155 is ChatMessage -> {
158156 // 만약 채팅 메시지를 수신했다면,
@@ -176,7 +174,6 @@ class ChatRepositoryImpl @Inject constructor(
176174 // 로컬에 해당 메시지를 저장
177175 localChatDataSource.insertMessage(message, userId)
178176 }
179-
180177 is ReadMessage -> {
181178 // 상대방이 읽었다는 메시지를 수신했다면,
182179 if (message.opponentId != userId) {
Original file line number Diff line number Diff line change 11package com.idle.network.source
22
33import com.idle.domain.model.auth.UserType
4- import com.idle.network.BuildConfig
54import com.idle.network.api.ChatApi
65import com.idle.network.di.TokenManager
76import com.idle.network.model.chat.ChatResponse
@@ -93,7 +92,7 @@ class ChatDataSource @Inject constructor(
9392
9493 suspend fun subscribeChatMessage (userId : String ): Flow <ChatResponse > =
9594 session?.subscribe(
96- StompSubscribeHeaders (destination = " /sub/${userId} " ),
95+ StompSubscribeHeaders (destination = " /sub/${' $ ' } { userId}" ),
9796 chatResponseSerializer,
9897 ) ? : flow { throw IOException (" 웹소켓을 먼저 연결해주세요." ) }
9998
You can’t perform that action at this time.
0 commit comments