Removed cant-vote-self-post

As suggested in nodebb/nodebb-theme-persona#203, a positive
action has been applied when a user attempts to upvote
their own post. It will now open the upvoters modal
instead of throwing an alertError.

Closes nodebb/nodebb-theme-persona#203
This commit is contained in:
Julian Lam
2015-11-16 15:02:24 -05:00
parent 6bb4a8ec85
commit 65ce8a50b3
3 changed files with 4 additions and 3 deletions

View File

@@ -255,7 +255,9 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
pid: post.attr('data-pid'),
room_id: app.currentRoom
}, function(err) {
if (err) {
if (err.message === 'self-vote') {
showVotes(post.attr('data-pid'));
} else {
app.alertError(err.message);
}
});