style changes

This commit is contained in:
Barış Soner Uşaklı
2017-05-26 00:02:20 -04:00
parent 8db193ff55
commit f6ac92111b
32 changed files with 846 additions and 815 deletions

View File

@@ -197,17 +197,18 @@ SocketUser.unfollow = function (socket, data, callback) {
};
function toggleFollow(method, uid, theiruid, callback) {
user[method](uid, theiruid, function (err) {
if (err) {
return callback(err);
}
plugins.fireHook('action:user.' + method, {
fromUid: uid,
toUid: theiruid,
});
callback();
});
async.waterfall([
function (next) {
user[method](uid, theiruid, next);
},
function (next) {
plugins.fireHook('action:user.' + method, {
fromUid: uid,
toUid: theiruid,
});
next();
},
], callback);
}
SocketUser.saveSettings = function (socket, data, callback) {