Generate random room on refresh

This commit is contained in:
Dan Seripap 2016-01-08 18:43:17 -05:00
parent 325c270990
commit 171b844e98
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ app.get('/:roomId', (req, res) => {
return res.render('index', {username: shortid.generate()}); return res.render('index', {username: shortid.generate()});
} }
return res.render('noop', {}); return res.redirect('/');
}); });

View File

@ -244,12 +244,12 @@ $(function() {
socket.on('login', function (data) { socket.on('login', function (data) {
connected = true; connected = true;
// Display the welcome message // Display the welcome message
var message = "Fatty.chat - Anonymous Chat"; var message = "Fatty.chat - Anonymous Chat - Room ID: " + roomId.replace('/', '');
log(message, { log(message, {
prepend: true prepend: true
}); });
message = "Chatrooms are destroyed after all participants exit. Chat history is not persistent and not saved."; message = "This chatroom is destroyed after all participants exit. Chat history is client side only and not persistent.";
log(message); log(message);