This commit is contained in:
barisusakli
2016-05-11 16:40:40 +03:00
parent 47b4b86bf1
commit a9828a1465
3 changed files with 46 additions and 2 deletions

View File

@@ -88,6 +88,12 @@ function followCommand(method, socket, tid, callback) {
method(tid, socket.uid, callback);
}
SocketTopics.isFollowed = function(socket, tid, callback) {
topics.isFollowing([tid], socket.uid, function(err, isFollowing) {
callback(err, Array.isArray(isFollowing) && isFollowing.length ? isFollowing[0] : false);
});
};
SocketTopics.search = function(socket, data, callback) {
topics.search(data.tid, data.term, callback);
};