Skip to content

Node.js based forum software built for the modern web

closes #293

Baris Soner Usaklib0a37c6ac5a1
diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js
index 3c67a6e170..4391b58cfc 100644
--- a/public/src/modules/chat.js
+++ b/public/src/modules/chat.js
@@ -25,9 +25,9 @@ define(['taskbar'], function(taskbar) {
socket.emit('api:user.isOnline', chatModal.touid, function(data) {
if(data.online !== chatModal.online) {
if(data.online) {
- module.appendChatMessage(chatModal, chatModal.username + ' has come online.\n', data.timestamp);
+ module.appendChatMessage(chatModal, chatModal.username + ' is currently online.\n', data.timestamp);
} else {
- module.appendChatMessage(chatModal, chatModal.username + ' has gone offline.\n', data.timestamp);
+ module.appendChatMessage(chatModal, chatModal.username + ' is currently offline.\n', data.timestamp);
}
chatModal.online = data.online;
}
@@ -38,7 +38,7 @@ define(['taskbar'], function(taskbar) {
function checkOnlineStatus(chatModal) {
if(chatModal.intervalId === 0) {
- chatModal.intervalId = setInterval(function(){
+ chatModal.intervalId = setInterval(function() {
checkStatus(chatModal);
}, 1000);
}
@@ -77,11 +77,8 @@ define(['taskbar'], function(taskbar) {
addSendHandler(chatModal);
- checkStatus(chatModal, function(online) {
- chatModal.online = online;
- getChatMessages(chatModal, function() {
- checkOnlineStatus(chatModal);
- });
+ getChatMessages(chatModal, function() {
+ checkOnlineStatus(chatModal);
});
taskbar.push('chat', chatModal.attr('UUID'), {title:'chat with ' + username});