mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
fix chats
This commit is contained in:
@@ -189,11 +189,14 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
return app.alertError('[[error:chat-message-too-long]]');
|
return app.alertError('[[error:chat-message-too-long]]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!msg.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
inputEl.val('');
|
inputEl.val('');
|
||||||
msg = msg + '\n';
|
|
||||||
socket.emit('modules.chats.send', {
|
socket.emit('modules.chats.send', {
|
||||||
touid:toUid,
|
touid: toUid,
|
||||||
message:msg
|
message: msg
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err.message === '[[error:email-not-confirmed-chat]]') {
|
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.usePagination = parseInt(meta.config.usePagination, 10) === 1;
|
||||||
config.disableSocialButtons = parseInt(meta.config.disableSocialButtons, 10) === 1;
|
config.disableSocialButtons = parseInt(meta.config.disableSocialButtons, 10) === 1;
|
||||||
config.disableChat = parseInt(meta.config.disableChat, 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.maxReconnectionAttempts = meta.config.maxReconnectionAttempts || 5;
|
||||||
config.reconnectionDelay = meta.config.reconnectionDelay || 1500;
|
config.reconnectionDelay = meta.config.reconnectionDelay || 1500;
|
||||||
config.minimumTagsPerTopic = meta.config.minimumTagsPerTopic || 0;
|
config.minimumTagsPerTopic = meta.config.minimumTagsPerTopic || 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user