Resolve merge conflicts, minify only .js files

This commit is contained in:
Peter Jaszkowiak
2017-02-23 18:31:49 -07:00
99 changed files with 4500 additions and 1751 deletions

View File

@@ -1,6 +1,6 @@
'use strict';
var async = require('async');
var async = require('async');
var posts = require('../posts');
var privileges = require('../privileges');
@@ -31,25 +31,26 @@ SocketPosts.reply = function (socket, data, callback) {
data.req = websockets.reqFromSocket(socket);
data.timestamp = Date.now();
topics.reply(data, function (err, postData) {
if (err) {
return callback(err);
}
async.waterfall([
function (next) {
topics.reply(data, next);
},
function (postData, next) {
var result = {
posts: [postData],
'reputation:disabled': parseInt(meta.config['reputation:disabled'], 10) === 1,
'downvote:disabled': parseInt(meta.config['downvote:disabled'], 10) === 1,
};
var result = {
posts: [postData],
'reputation:disabled': parseInt(meta.config['reputation:disabled'], 10) === 1,
'downvote:disabled': parseInt(meta.config['downvote:disabled'], 10) === 1,
};
next(null, postData);
callback(null, postData);
websockets.in('uid_' + socket.uid).emit('event:new_post', result);
websockets.in('uid_' + socket.uid).emit('event:new_post', result);
user.updateOnlineUsers(socket.uid);
user.updateOnlineUsers(socket.uid);
socketHelpers.notifyNew(socket.uid, 'newPost', result);
});
socketHelpers.notifyNew(socket.uid, 'newPost', result);
},
], callback);
};
SocketPosts.getRawPost = function (socket, pid, callback) {
@@ -120,7 +121,7 @@ SocketPosts.getPidIndex = function (socket, data, callback) {
SocketPosts.getReplies = function (socket, pid, callback) {
if (!utils.isNumber(pid)) {
return callback(new Error('[[error:invalid-data]'));
return callback(new Error('[[error:invalid-data]]'));
}
var postPrivileges;
async.waterfall([