added topics.follow and toggleFollow

v1.18.x
barisusakli 10 years ago
parent 5a1c2b9ddf
commit e31bf9131f

@ -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]]'));

Loading…
Cancel
Save