johnnymast / mysql_websocket_chat

Quickly get a websocket chat up and running
MIT License
21 stars 11 forks source link

Private chat and load chat history from database #26

Open shahzadthathal opened 6 years ago

shahzadthathal commented 6 years ago

Hi,

Great work.

Is it possible to make a private chat room and when user reload the page chat history load from the database?

Thanks

johnnymast commented 6 years ago

Yes if you enable the database in config.php you could show chat history in the chat. However every time you reload a page a new random user is created so it would not make sence. You should first make the user not random and then load the chat history from the database. This will not be hard to implement.