Closed mikeyc1030 closed 2 years ago
Thanks for opening up your first issue!
This is a superb component, demo works nicely, I am however struggling to get more than one user chatting to each other.
Messages are added to this.messageList in the method onMessageWasSent in App.vue but not saved to a database or JSON file. How does another user join in the chat if the messages are not accessable from another browser session?
In your demo both the test area input form and the chat window are accessing the same variables so no need to store the messages. But how would you get mutliple users accessing the same conversation? I may have misinterperted how this works, if so apologies, but otherwise how would I achieve this?
Hello, to solve your problem, you need to implement an api and with requests to save user messages when loading a page with a chat in each new session, you need to pull up the last 10 or 20 messages from the server using api. I advise you to implement this on socket.io, since each new message will need not only to be saved in the database, but also immediately parsed to all chats that are active
Thanks for the advice and the quick response, much appreciated.
This is a superb component, demo works nicely, I am however struggling to get more than one user chatting to each other.
Messages are added to this.messageList in the method onMessageWasSent in App.vue but not saved to a database or JSON file. How does another user join in the chat if the messages are not accessable from another browser session?
In your demo both the test area input form and the chat window are accessing the same variables so no need to store the messages. But how would you get mutliple users accessing the same conversation? I may have misinterperted how this works, if so apologies, but otherwise how would I achieve this?