From 171b844e98bda4719a8161f989e3eec056f81a75 Mon Sep 17 00:00:00 2001 From: Dan Seripap Date: Fri, 8 Jan 2016 18:43:17 -0500 Subject: [PATCH] Generate random room on refresh --- src/app.js | 2 +- src/public/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.js b/src/app.js index 0c0fa4b..c9d7306 100644 --- a/src/app.js +++ b/src/app.js @@ -68,7 +68,7 @@ app.get('/:roomId', (req, res) => { return res.render('index', {username: shortid.generate()}); } - return res.render('noop', {}); + return res.redirect('/'); }); diff --git a/src/public/main.js b/src/public/main.js index 0a08ba5..2923fba 100644 --- a/src/public/main.js +++ b/src/public/main.js @@ -244,12 +244,12 @@ $(function() { socket.on('login', function (data) { connected = true; // Display the welcome message - var message = "Fatty.chat - Anonymous Chat"; + var message = "Fatty.chat - Anonymous Chat - Room ID: " + roomId.replace('/', ''); log(message, { 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);