|
|
|
@ -281,7 +281,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('api:user.follow', function(data) {
|
|
|
|
|
|
|
|
|
|
if(uid) {
|
|
|
|
|
user.follow(uid, data.uid, function(success) {
|
|
|
|
|
if(success) {
|
|
|
|
|
user.getUserField(data.uid, 'username', function(username) {
|
|
|
|
@ -294,10 +294,11 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
socket.on('api:user.unfollow', function(data) {
|
|
|
|
|
|
|
|
|
|
if(uid) {
|
|
|
|
|
user.unfollow(uid, data.uid, function(success) {
|
|
|
|
|
if(success) {
|
|
|
|
|
user.getUserField(data.uid, 'username', function(username) {
|
|
|
|
@ -310,6 +311,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
socket.on('api:topics.post', function(data) {
|
|
|
|
|