|
|
|
@ -396,7 +396,7 @@ SocketTopics.moveAll = function(socket, data, callback) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SocketTopics.follow = function(socket, tid, callback) {
|
|
|
|
|
SocketTopics.toggleFollow = function(socket, tid, callback) {
|
|
|
|
|
if(!socket.uid) {
|
|
|
|
|
return callback(new Error('[[error:not-logged-in]]'));
|
|
|
|
|
}
|
|
|
|
@ -404,6 +404,14 @@ SocketTopics.follow = function(socket, tid, callback) {
|
|
|
|
|
topics.toggleFollow(tid, socket.uid, callback);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SocketTopics.follow = function(socket, tid, callback) {
|
|
|
|
|
if(!socket.uid) {
|
|
|
|
|
return callback(new Error('[[error:not-logged-in]]'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
topics.follow(tid, socket.uid, callback);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SocketTopics.loadMore = function(socket, data, callback) {
|
|
|
|
|
if(!data || !data.tid || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0) {
|
|
|
|
|
return callback(new Error('[[error:invalid-data]]'));
|
|
|
|
|