|
|
|
@ -185,7 +185,10 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|
|
|
|
|
|
|
|
|
Chats.sendMessage = function(toUid, inputEl) {
|
|
|
|
|
var msg = inputEl.val();
|
|
|
|
|
if (msg.length) {
|
|
|
|
|
if (msg.length > config.maximumChatMessageLength) {
|
|
|
|
|
return app.alertError('[[error:chat-message-too-long]]');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inputEl.val('');
|
|
|
|
|
msg = msg + '\n';
|
|
|
|
|
socket.emit('modules.chats.send', {
|
|
|
|
@ -202,7 +205,6 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|
|
|
|
sounds.play('chat-outgoing');
|
|
|
|
|
Chats.notifyTyping(toUid, false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Chats.scrollToBottom = function(containerEl) {
|
|
|
|
|