show proper error if user is not logged in

v1.18.x
barisusakli 9 years ago
parent 323cc165b6
commit 27f77bf832

@ -100,6 +100,9 @@ module.exports = function(SocketPosts) {
};
function favouriteCommand(socket, command, eventName, notification, data, callback) {
if (!socket.uid) {
return callback(new Error('[[error:not-logged-in]]'))
}
if(!data || !data.pid || !data.room_id) {
return callback(new Error('[[error:invalid-data]]'));
}

Loading…
Cancel
Save