fixing bug where the favourites star was still shaded in if an anon tried to favourite a post

This commit is contained in:
Julian Lam
2013-05-16 11:23:57 -04:00
parent 71482163ed
commit 6013017ffd
2 changed files with 18 additions and 2 deletions

View File

@@ -277,6 +277,11 @@ marked.setOptions({
type: 'error',
timeout: 5000
});
socket.emit('api:posts.favourite', {
status: 'error',
pid: pid
});
return;
}
@@ -293,6 +298,10 @@ marked.setOptions({
if (room_id) {
io.sockets.in(room_id).emit('event:rep_up', {uid: uid !== uid_of_poster ? uid_of_poster : 0, pid: pid});
}
socket.emit('api:posts.favourite', {
status: 'ok'
});
}
});
});