@@ -22,11 +22,11 @@ const initialState = {
2222} ;
2323
2424const messagesReducer = {
25- [ ADD_NEW_USER_MESSAGE ] : ( state : MessagesState , { text, showClientAvatar, id } ) =>
26- ( { ...state , messages : [ ...state . messages , createNewMessage ( text , MESSAGE_SENDER . CLIENT , id ) ] } ) ,
25+ [ ADD_NEW_USER_MESSAGE ] : ( state : MessagesState , { text, showClientAvatar, id, date } ) =>
26+ ( { ...state , messages : [ ...state . messages , createNewMessage ( text , MESSAGE_SENDER . CLIENT , id , date ) ] } ) ,
2727
28- [ ADD_NEW_RESPONSE_MESSAGE ] : ( state : MessagesState , { text, id } ) =>
29- ( { ...state , messages : [ ...state . messages , createNewMessage ( text , MESSAGE_SENDER . RESPONSE , id ) ] , badgeCount : state . badgeCount + 1 } ) ,
28+ [ ADD_NEW_RESPONSE_MESSAGE ] : ( state : MessagesState , { text, id, date } ) =>
29+ ( { ...state , messages : [ ...state . messages , createNewMessage ( text , MESSAGE_SENDER . RESPONSE , id , date ) ] , badgeCount : state . badgeCount + 1 } ) ,
3030
3131 [ ADD_NEW_LINK_SNIPPET ] : ( state : MessagesState , { link, id } ) =>
3232 ( { ...state , messages : [ ...state . messages , createLinkSnippet ( link , id ) ] } ) ,
0 commit comments