fix: update message ack
parent
3ced558b18
commit
fce5554681
|
@ -451,15 +451,16 @@ const MessagesList = ({ ticketId, isGroup }) => {
|
|||
socket.on("connect", onConnectMessagesList)
|
||||
|
||||
const onAppMessageMessagesList = (data) => {
|
||||
if (+data.message.ticketId !== +ticketId) return
|
||||
|
||||
if (data.action === "create" && data.ticket.id == ticketId) {
|
||||
if (data.action === "create") {
|
||||
|
||||
dispatch({ type: "ADD_MESSAGE", payload: data.message })
|
||||
|
||||
scrollToBottom()
|
||||
}
|
||||
|
||||
if (data.action === "update" && data.ticket.id == ticketId) {
|
||||
if (data.action === "update") {
|
||||
dispatch({ type: "UPDATE_MESSAGE", payload: data.message })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue