mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
more room changes app.openChat
This commit is contained in:
@@ -239,11 +239,7 @@ app.cacheBuster = null;
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
app.openChat = function (username, touid) {
|
app.openChat = function (roomId) {
|
||||||
if (username === app.user.username) {
|
|
||||||
return app.alertError('[[error:cant-chat-with-yourself]]');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!app.user.uid) {
|
if (!app.user.uid) {
|
||||||
return app.alertError('[[error:not-logged-in]]');
|
return app.alertError('[[error:not-logged-in]]');
|
||||||
}
|
}
|
||||||
@@ -255,13 +251,12 @@ app.cacheBuster = null;
|
|||||||
chat.focusInput(chatModal);
|
chat.focusInput(chatModal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chat.modalExists(touid)) {
|
if (!chat.modalExists(roomId)) {
|
||||||
chat.createModal({
|
chat.createModal({
|
||||||
username: username,
|
roomId: roomId
|
||||||
touid: touid
|
|
||||||
}, loadAndCenter);
|
}, loadAndCenter);
|
||||||
} else {
|
} else {
|
||||||
loadAndCenter(chat.getModal(touid));
|
loadAndCenter(chat.getModal(roomId));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
|
|
||||||
Chats.initialised = true;
|
Chats.initialised = true;
|
||||||
|
|
||||||
if (ajaxify.data.hasOwnProperty('meta') && ajaxify.data.meta.hasOwnProperty('uid')) {
|
if (ajaxify.data.hasOwnProperty('roomId')) {
|
||||||
// This is an active chat, focus on the input box
|
|
||||||
components.get('chat/input').focus();
|
components.get('chat/input').focus();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -47,20 +46,20 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
Chats.switchChat($(this).attr('data-roomid'));
|
Chats.switchChat($(this).attr('data-roomid'));
|
||||||
});
|
});
|
||||||
|
|
||||||
Chats.addSendHandlers(Chats.getRecipientUid(), $('.chat-input'), $('.expanded-chat button[data-action="send"]'));
|
Chats.addSendHandlers(ajaxify.data.roomId, $('.chat-input'), $('.expanded-chat button[data-action="send"]'));
|
||||||
|
|
||||||
$('[data-action="pop-out"]').on('click', function() {
|
$('[data-action="pop-out"]').on('click', function() {
|
||||||
var username = $('.expanded-chat').attr('data-username'),
|
|
||||||
uid = Chats.getRecipientUid(),
|
var text = components.get('chat/input').val();
|
||||||
text = components.get('chat/input').val();
|
var roomId = ajaxify.data.roomId;
|
||||||
|
|
||||||
if (app.previousUrl && app.previousUrl.match(/chats/)) {
|
if (app.previousUrl && app.previousUrl.match(/chats/)) {
|
||||||
ajaxify.go('chats', function() {
|
ajaxify.go('chats', function() {
|
||||||
app.openChat(username, uid);
|
app.openChat(roomId);
|
||||||
}, true);
|
}, true);
|
||||||
} else {
|
} else {
|
||||||
window.history.go(-1);
|
window.history.go(-1);
|
||||||
app.openChat(username, uid);
|
app.openChat(roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).one('action:chat.loaded', function() {
|
$(window).one('action:chat.loaded', function() {
|
||||||
@@ -87,7 +86,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Chats.addSinceHandler(Chats.getRecipientUid(), $('.expanded-chat .chat-content'), $('.expanded-chat [data-since]'));
|
Chats.addSinceHandler(ajaxify.data.roomId, $('.expanded-chat .chat-content'), $('.expanded-chat [data-since]'));
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.addHotkeys = function() {
|
Chats.addHotkeys = function() {
|
||||||
@@ -121,6 +120,9 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
|
|
||||||
Chats.prepEdit = function(inputEl, messageId) {
|
Chats.prepEdit = function(inputEl, messageId) {
|
||||||
socket.emit('modules.chats.getRaw', { mid: messageId }, function(err, raw) {
|
socket.emit('modules.chats.getRaw', { mid: messageId }, function(err, raw) {
|
||||||
|
if (err) {
|
||||||
|
return app.alertError(err.message);
|
||||||
|
}
|
||||||
// Populate the input field with the raw message content
|
// Populate the input field with the raw message content
|
||||||
if (inputEl.val().length === 0) {
|
if (inputEl.val().length === 0) {
|
||||||
// By setting the `data-mid` attribute, I tell the chat code that I am editing a
|
// By setting the `data-mid` attribute, I tell the chat code that I am editing a
|
||||||
@@ -134,39 +136,40 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
Chats.delete = function(messageId) {
|
Chats.delete = function(messageId) {
|
||||||
translator.translate('[[modules:chat.delete_message_confirm]]', function(translated) {
|
translator.translate('[[modules:chat.delete_message_confirm]]', function(translated) {
|
||||||
bootbox.confirm(translated, function(ok) {
|
bootbox.confirm(translated, function(ok) {
|
||||||
if (ok) {
|
if (!ok) {
|
||||||
socket.emit('modules.chats.delete', {
|
return;
|
||||||
messageId: messageId
|
|
||||||
}, function(err) {
|
|
||||||
if (err) {
|
|
||||||
return app.alertError(err.message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove message from list
|
|
||||||
components.get('chat/message', messageId).slideUp('slow', function() {
|
|
||||||
$(this).remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
socket.emit('modules.chats.delete', {
|
||||||
|
messageId: messageId
|
||||||
|
}, function(err) {
|
||||||
|
if (err) {
|
||||||
|
return app.alertError(err.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
components.get('chat/message', messageId).slideUp('slow', function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.addSinceHandler = function(toUid, chatContentEl, sinceEl) {
|
Chats.addSinceHandler = function(roomId, chatContentEl, sinceEl) {
|
||||||
sinceEl.on('click', function() {
|
sinceEl.on('click', function() {
|
||||||
var since = $(this).attr('data-since');
|
var since = $(this).attr('data-since');
|
||||||
sinceEl.removeClass('selected');
|
sinceEl.removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
Chats.loadChatSince(toUid, chatContentEl, since);
|
Chats.loadChatSince(roomId, chatContentEl, since);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.addSendHandlers = function(toUid, inputEl, sendEl) {
|
Chats.addSendHandlers = function(roomId, inputEl, sendEl) {
|
||||||
|
|
||||||
inputEl.off('keypress').on('keypress', function(e) {
|
inputEl.off('keypress').on('keypress', function(e) {
|
||||||
if (e.which === 13 && !e.shiftKey) {
|
if (e.which === 13 && !e.shiftKey) {
|
||||||
Chats.sendMessage(toUid, inputEl);
|
Chats.sendMessage(roomId, inputEl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -177,12 +180,12 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Chats.notifyTyping(toUid, val);
|
Chats.notifyTyping(roomId, val);
|
||||||
$(this).attr('data-typing', val);
|
$(this).attr('data-typing', val);
|
||||||
});
|
});
|
||||||
|
|
||||||
sendEl.off('click').on('click', function() {
|
sendEl.off('click').on('click', function() {
|
||||||
Chats.sendMessage(toUid, inputEl);
|
Chats.sendMessage(roomId, inputEl);
|
||||||
inputEl.focus();
|
inputEl.focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@@ -192,11 +195,11 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
ajaxify.go('chats/' + roomid);
|
ajaxify.go('chats/' + roomid);
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.loadChatSince = function(toUid, chatContentEl, since) {
|
Chats.loadChatSince = function(roomId, chatContentEl, since) {
|
||||||
if (!toUid) {
|
if (!roomId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
socket.emit('modules.chats.get', {touid: toUid, since: since}, function(err, messages) {
|
socket.emit('modules.chats.get', {roomId: roomId, since: since}, function(err, messages) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
@@ -210,12 +213,9 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
Chats.addGlobalEventListeners = function() {
|
Chats.addGlobalEventListeners = function() {
|
||||||
$(window).on('resize', Chats.resizeMainWindow);
|
$(window).on('resize', Chats.resizeMainWindow);
|
||||||
$(window).on('mousemove keypress click', function() {
|
$(window).on('mousemove keypress click', function() {
|
||||||
if (newMessage) {
|
if (newMessage && ajaxify.data.roomId) {
|
||||||
var recipientUid = Chats.getRecipientUid();
|
socket.emit('modules.chats.markRead', ajaxify.data.roomId);
|
||||||
if (recipientUid) {
|
newMessage = false;
|
||||||
socket.emit('modules.chats.markRead', recipientUid);
|
|
||||||
newMessage = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -325,14 +325,14 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
Chats.setActive();
|
Chats.setActive();
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.notifyTyping = function(toUid, typing) {
|
Chats.notifyTyping = function(roomId, typing) {
|
||||||
socket.emit('modules.chats.user' + (typing ? 'Start' : 'Stop') + 'Typing', {
|
socket.emit('modules.chats.user' + (typing ? 'Start' : 'Stop') + 'Typing', {
|
||||||
touid: toUid,
|
roomId: roomId,
|
||||||
fromUid: app.user.uid
|
fromUid: app.user.uid
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.sendMessage = function(toUid, inputEl) {
|
Chats.sendMessage = function(roomId, inputEl) {
|
||||||
var msg = inputEl.val(),
|
var msg = inputEl.val(),
|
||||||
mid = inputEl.attr('data-mid');
|
mid = inputEl.attr('data-mid');
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
|
|
||||||
if (!mid) {
|
if (!mid) {
|
||||||
socket.emit('modules.chats.send', {
|
socket.emit('modules.chats.send', {
|
||||||
touid: toUid,
|
roomId: roomId,
|
||||||
message: msg
|
message: msg
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -360,7 +360,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
}
|
}
|
||||||
|
|
||||||
sounds.play('chat-outgoing');
|
sounds.play('chat-outgoing');
|
||||||
Chats.notifyTyping(toUid, false);
|
Chats.notifyTyping(roomId, false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
socket.emit('modules.chats.edit', {
|
socket.emit('modules.chats.edit', {
|
||||||
@@ -371,7 +371,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
Chats.notifyTyping(toUid, false);
|
Chats.notifyTyping(roomId, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -385,9 +385,8 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
};
|
};
|
||||||
|
|
||||||
Chats.setActive = function() {
|
Chats.setActive = function() {
|
||||||
var recipientUid = Chats.getRecipientUid();
|
if (ajaxify.data.roomId) {
|
||||||
if (recipientUid) {
|
socket.emit('modules.chats.markRead', ajaxify.data.roomId);
|
||||||
socket.emit('modules.chats.markRead', recipientUid);
|
|
||||||
$('.expanded-chat input').focus();
|
$('.expanded-chat input').focus();
|
||||||
}
|
}
|
||||||
$('.chats-list li').removeClass('bg-primary');
|
$('.chats-list li').removeClass('bg-primary');
|
||||||
|
|||||||
@@ -129,9 +129,9 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
dropdownEl.click(function() {
|
dropdownEl.click(function() {
|
||||||
if (!ajaxify.currentPage.match(/^chats\//)) {
|
if (!ajaxify.currentPage.match(/^chats\//)) {
|
||||||
app.openChat(userObj.username, userObj.uid);
|
app.openChat(roomObj.roomId);
|
||||||
} else {
|
} else {
|
||||||
ajaxify.go('chats/' + utils.slugify(userObj.username));
|
ajaxify.go('chats/' + roomObj.roomId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -156,12 +156,12 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
chatModal.css('zIndex', topZ + 1);
|
chatModal.css('zIndex', topZ + 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.getModal = function(touid) {
|
module.getModal = function(roomId) {
|
||||||
return $('#chat-modal-' + touid);
|
return $('#chat-modal-' + roomId);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.modalExists = function(touid) {
|
module.modalExists = function(roomId) {
|
||||||
return $('#chat-modal-' + touid).length !== 0;
|
return $('#chat-modal-' + roomId).length !== 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
function checkStatus(chatModal) {
|
function checkStatus(chatModal) {
|
||||||
@@ -182,8 +182,8 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
uuid = utils.generateUUID(),
|
uuid = utils.generateUUID(),
|
||||||
dragged = false;
|
dragged = false;
|
||||||
|
|
||||||
chatModal.attr('id', 'chat-modal-' + data.touid);
|
chatModal.attr('id', 'chat-modal-' + data.roomId);
|
||||||
chatModal.attr('touid', data.touid);
|
chatModal.attr('roomId', data.roomId);
|
||||||
chatModal.attr('intervalId', 0);
|
chatModal.attr('intervalId', 0);
|
||||||
chatModal.attr('UUID', uuid);
|
chatModal.attr('UUID', uuid);
|
||||||
chatModal.css('position', 'fixed');
|
chatModal.css('position', 'fixed');
|
||||||
@@ -254,7 +254,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
chatModal.on('mousemove keypress click', function() {
|
chatModal.on('mousemove keypress click', function() {
|
||||||
if (newMessage) {
|
if (newMessage) {
|
||||||
socket.emit('modules.chats.markRead', data.touid);
|
socket.emit('modules.chats.markRead', data.roomId);
|
||||||
newMessage = false;
|
newMessage = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -270,15 +270,15 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
Chats.delete(messageId);
|
Chats.delete(messageId);
|
||||||
});
|
});
|
||||||
|
|
||||||
Chats.addSinceHandler(chatModal.attr('touid'), chatModal.find('.chat-content'), chatModal.find('[data-since]'));
|
Chats.addSinceHandler(chatModal.attr('roomId'), chatModal.find('.chat-content'), chatModal.find('[data-since]'));
|
||||||
|
|
||||||
Chats.addSendHandlers(chatModal.attr('touid'), chatModal.find('#chat-message-input'), chatModal.find('#chat-message-send-btn'));
|
Chats.addSendHandlers(chatModal.attr('roomId'), chatModal.find('#chat-message-input'), chatModal.find('#chat-message-send-btn'));
|
||||||
|
|
||||||
Chats.loadChatSince(chatModal.attr('touid'), chatModal.find('.chat-content'), 'recent');
|
Chats.loadChatSince(chatModal.attr('roomId'), chatModal.find('.chat-content'), 'recent');
|
||||||
|
|
||||||
checkStatus(chatModal);
|
checkStatus(chatModal);
|
||||||
|
|
||||||
module.canMessage(data.touid, function(err) {
|
module.canMessage(data.roomId, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
// Disable the text input
|
// Disable the text input
|
||||||
chatModal.find('input[type="text"]').attr('disabled', true);
|
chatModal.find('input[type="text"]').attr('disabled', true);
|
||||||
@@ -287,7 +287,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
taskbar.push('chat', chatModal.attr('UUID'), {
|
taskbar.push('chat', chatModal.attr('UUID'), {
|
||||||
title: data.username,
|
title: data.username,
|
||||||
touid: data.touid,
|
roomId: data.roomId,
|
||||||
icon: 'fa-comment',
|
icon: 'fa-comment',
|
||||||
state: ''
|
state: ''
|
||||||
});
|
});
|
||||||
@@ -311,7 +311,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
chatModal.remove();
|
chatModal.remove();
|
||||||
chatModal.data('modal', null);
|
chatModal.data('modal', null);
|
||||||
taskbar.discard('chat', chatModal.attr('UUID'));
|
taskbar.discard('chat', chatModal.attr('UUID'));
|
||||||
Chats.notifyTyping(chatModal.attr('touid'), false);
|
Chats.notifyTyping(chatModal.attr('roomId'), false);
|
||||||
|
|
||||||
if (chatModal.attr('data-mobile')) {
|
if (chatModal.attr('data-mobile')) {
|
||||||
module.disableMobileBehaviour(chatModal);
|
module.disableMobileBehaviour(chatModal);
|
||||||
@@ -334,14 +334,14 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.load = function(uuid) {
|
module.load = function(uuid) {
|
||||||
var chatModal = $('div[UUID="'+uuid+'"]');
|
var chatModal = $('div[UUID="' + uuid + '"]');
|
||||||
chatModal.removeClass('hide');
|
chatModal.removeClass('hide');
|
||||||
checkStatus(chatModal);
|
checkStatus(chatModal);
|
||||||
taskbar.updateActive(uuid);
|
taskbar.updateActive(uuid);
|
||||||
Chats.scrollToBottom(chatModal.find('.chat-content'));
|
Chats.scrollToBottom(chatModal.find('.chat-content'));
|
||||||
module.bringModalToTop(chatModal);
|
module.bringModalToTop(chatModal);
|
||||||
module.focusInput(chatModal);
|
module.focusInput(chatModal);
|
||||||
socket.emit('modules.chats.markRead', chatModal.attr('touid'));
|
socket.emit('modules.chats.markRead', chatModal.attr('roomId'));
|
||||||
|
|
||||||
var env = utils.findBootstrapEnvironment();
|
var env = utils.findBootstrapEnvironment();
|
||||||
if (env === 'xs' || env === 'sm') {
|
if (env === 'xs' || env === 'sm') {
|
||||||
@@ -380,13 +380,13 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
taskbar.minimize('chat', uuid);
|
taskbar.minimize('chat', uuid);
|
||||||
clearInterval(chatModal.attr('intervalId'));
|
clearInterval(chatModal.attr('intervalId'));
|
||||||
chatModal.attr('intervalId', 0);
|
chatModal.attr('intervalId', 0);
|
||||||
Chats.notifyTyping(chatModal.attr('touid'), false);
|
Chats.notifyTyping(chatModal.attr('roomId'), false);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.toggleNew = taskbar.toggleNew;
|
module.toggleNew = taskbar.toggleNew;
|
||||||
|
|
||||||
module.canMessage = function(toUid, callback) {
|
module.canMessage = function(roomId, callback) {
|
||||||
socket.emit('modules.chats.canMessage', toUid, callback);
|
socket.emit('modules.chats.canMessage', roomId, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ var meta = require('../meta'),
|
|||||||
/* Chat */
|
/* Chat */
|
||||||
|
|
||||||
SocketModules.chats.get = function(socket, data, callback) {
|
SocketModules.chats.get = function(socket, data, callback) {
|
||||||
if(!data) {
|
if(!data || !data.roomId) {
|
||||||
return callback(new Error('[[error:invalid-data]]'));
|
return callback(new Error('[[error:invalid-data]]'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,14 +97,14 @@ SocketModules.chats.delete = function(socket, data, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketModules.chats.canMessage = function(socket, toUid, callback) {
|
SocketModules.chats.canMessage = function(socket, roomId, callback) {
|
||||||
Messaging.canMessage(socket.uid, toUid, function(err, allowed) {
|
Messaging.canMessage(socket.uid, roomId, function(err, allowed) {
|
||||||
callback(!allowed ? new Error('[[error:chat-restricted]]') : undefined);
|
callback(!allowed ? new Error('[[error:chat-restricted]]') : undefined);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
SocketModules.chats.markRead = function(socket, touid, callback) {
|
SocketModules.chats.markRead = function(socket, roomId, callback) {
|
||||||
Messaging.markRead(socket.uid, touid, function(err) {
|
Messaging.markRead(socket.uid, roomId, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user