mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
improvement: rejoin websocket channels after reconnecting
This commit is contained in:
@@ -86,7 +86,8 @@ const Ticket = () => {
|
||||
|
||||
useEffect(() => {
|
||||
const socket = openSocket(process.env.REACT_APP_BACKEND_URL);
|
||||
socket.emit("joinChatBox", ticketId);
|
||||
|
||||
socket.on("connect", () => socket.emit("joinChatBox", ticketId));
|
||||
|
||||
socket.on("ticket", data => {
|
||||
if (data.action === "updateStatus") {
|
||||
|
||||
Reference in New Issue
Block a user