Made it ignore rate limits for voting.

This commit is contained in:
Ajay Ramachandran 2019-09-24 17:55:07 -04:00
parent ef1b96bbf1
commit 04190b27d8
2 changed files with 4 additions and 4 deletions

View file

@ -879,8 +879,8 @@ function vote(type, UUID, skipNotice) {
if (response != undefined) { if (response != undefined) {
//see if it was a success or failure //see if it was a success or failure
if (skipNotice != null) { if (skipNotice != null) {
if (response.successType == 1) { if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
//success //success (treat rate limits as a success)
if (type == 0) { if (type == 0) {
skipNotice.afterDownvote.bind(skipNotice)(); skipNotice.afterDownvote.bind(skipNotice)();
} }

View file

@ -1102,8 +1102,8 @@ function runThePopup() {
}, function(response) { }, function(response) {
if (response != undefined) { if (response != undefined) {
//see if it was a success or failure //see if it was a success or failure
if (response.successType == 1) { if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
//success //success (treat rate limits as a success)
addVoteMessage(chrome.i18n.getMessage("voted"), UUID) addVoteMessage(chrome.i18n.getMessage("voted"), UUID)
} else if (response.successType == 0) { } else if (response.successType == 0) {
//failure: duplicate vote //failure: duplicate vote