File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
frontend/src/statemanagement/chats Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const initialState: ChatState = {
1919
2020const setMessagesForChat = (
2121 chat : ChatRoomWithNotifications ,
22- activeChatId ?: string ,
2322 messagesToAdd ?: ChatMessage [ ]
2423) => {
2524 const { messages, noNewMessages } = createUniqueMessages (
@@ -129,11 +128,7 @@ export const chatSlice = createSlice({
129128 updateChatRoomMessagesSync : ( state , action : { payload : ChatRoom } ) => {
130129 const chatRoom = state . chats . find ( ( x ) => x . id == action . payload . id ) ;
131130 if ( chatRoom != null ) {
132- setMessagesForChat (
133- chatRoom ,
134- state . activeChatId ,
135- action . payload . messages
136- ) ;
131+ setMessagesForChat ( chatRoom , action . payload . messages ) ;
137132 } else {
138133 state . chats . push ( { ...action . payload , unreadMessages : 1 } ) ;
139134 }
@@ -165,7 +160,7 @@ export const chatSlice = createSlice({
165160 state . chatIsLoading = false ;
166161 const chat = state . chats . find ( ( x ) => x . id == action . payload . chatId ) ;
167162 if ( chat != null ) {
168- setMessagesForChat ( chat , state . activeChatId , action . payload . messages ) ;
163+ setMessagesForChat ( chat , action . payload . messages ) ;
169164 }
170165 }
171166 ) ;
You can’t perform that action at this time.
0 commit comments