You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
I'm trying to build out a live chat customer support portal. I need to ensure the user cannot send a message if the support agent is offline. When checking the object in the console, i am able to see the online status of the user and agent. however, when trying to access it in the code it is non-enumerable and gives me a status of undefined (for the agent from the customer side).
i created a function with the following in Customer.js :
checkSupportStatus = () => {
const { currentRoom, currentUser } = this.state;
console.log("\n\n\n\n\ test current user",currentUser.rooms[0].users[1].presence);
}
I plan to use the above function to set a boolean to display a form instead of chat in case the "support" is offline.
the above code is being called in the createRoom function as below:
I'm trying to build out a live chat customer support portal. I need to ensure the user cannot send a message if the support agent is offline. When checking the object in the console, i am able to see the online status of the user and agent. however, when trying to access it in the code it is non-enumerable and gives me a status of undefined (for the agent from the customer side).
i created a function with the following in Customer.js :
I plan to use the above function to set a boolean to display a form instead of chat in case the "support" is offline.
the above code is being called in the createRoom function as below:
the object returned is the following:
presence appears unenumerable but when clicked shows the correct online status
The text was updated successfully, but these errors were encountered: