Like stevenic mentioned, you need a way to block the other users from engaging until the assistant is done. You can easily do this with web socket.
I do not know why in your current implementation the third person’s role is limited to observing. Use the metadata in the message to set which person is sending the message.
Here is a sample convo of my implementation using socket io.
