fix chats

v1.18.x
Barış Soner Uşaklı 10 years ago
parent e9692a3e1f
commit 6d8134618f

@ -189,11 +189,14 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
return app.alertError('[[error:chat-message-too-long]]');
}
if (!msg.length) {
return;
}
inputEl.val('');
msg = msg + '\n';
socket.emit('modules.chats.send', {
touid:toUid,
message:msg
touid: toUid,
message: msg
}, function(err) {
if (err) {
if (err.message === '[[error:email-not-confirmed-chat]]') {

@ -54,7 +54,7 @@ apiController.getConfig = function(req, res, next) {
config.usePagination = parseInt(meta.config.usePagination, 10) === 1;
config.disableSocialButtons = parseInt(meta.config.disableSocialButtons, 10) === 1;
config.disableChat = parseInt(meta.config.disableChat, 10) === 1;
config.maximumChatMessageLength = parseInt(meta.config.maximumChatMessageLength, 10);
config.maximumChatMessageLength = parseInt(meta.config.maximumChatMessageLength, 10) || 1000;
config.maxReconnectionAttempts = meta.config.maxReconnectionAttempts || 5;
config.reconnectionDelay = meta.config.reconnectionDelay || 1500;
config.minimumTagsPerTopic = meta.config.minimumTagsPerTopic || 0;

Loading…
Cancel
Save