mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-20 00:31:35 +02:00
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:
@@ -62,7 +62,6 @@
|
||||
|
||||
"file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file",
|
||||
|
||||
"cant-vote-self-post": "You cannot vote for your own post",
|
||||
"already-favourited": "You have already favourited this post",
|
||||
"already-unfavourited": "You have already unfavourited this post",
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -204,7 +204,7 @@ var async = require('async'),
|
||||
}
|
||||
|
||||
if (parseInt(uid, 10) === parseInt(results.owner, 10)) {
|
||||
return callback(new Error('[[error:cant-vote-self-post]]'));
|
||||
return callback(new Error('self-vote'));
|
||||
}
|
||||
|
||||
var voteStatus = results.voteStatus,
|
||||
|
||||
Reference in New Issue
Block a user