mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
Revert "fix: contact profilePic not updating in ticket header"
This reverts commit d198243bf9.
This commit is contained in:
@@ -353,15 +353,7 @@ const Ticket = () => {
|
|||||||
if (data.action === "create") {
|
if (data.action === "create") {
|
||||||
dispatch({ type: "ADD_MESSAGE", payload: data.message });
|
dispatch({ type: "ADD_MESSAGE", payload: data.message });
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
|
|
||||||
setContact(prevState => {
|
|
||||||
if (prevState.id === data.contact?.id) {
|
|
||||||
return data.contact;
|
|
||||||
}
|
|
||||||
return prevState;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.action === "update") {
|
if (data.action === "update") {
|
||||||
dispatch({ type: "UPDATE_MESSAGE", payload: data.message });
|
dispatch({ type: "UPDATE_MESSAGE", payload: data.message });
|
||||||
}
|
}
|
||||||
@@ -380,12 +372,7 @@ const Ticket = () => {
|
|||||||
|
|
||||||
socket.on("contact", data => {
|
socket.on("contact", data => {
|
||||||
if (data.action === "update") {
|
if (data.action === "update") {
|
||||||
setContact(prevState => {
|
setContact(data.contact);
|
||||||
if (prevState.id === data.contact?.id) {
|
|
||||||
return data.contact;
|
|
||||||
}
|
|
||||||
return prevState;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user