Skip to content

Commit

Permalink
Temp fix for colinking#54
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Aug 14, 2016
1 parent c5ef524 commit 3a528a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/thread-unsubscribe-store.es6
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class ThreadUnsubscribeStore extends NylasStore {
unsubscribeLinks.push(trimmedLink.substring(1, trimmedLink.length - 1));
}
} else {
// if (this.checkLinkBlacklist(trimmedLink) === false) {
unsubscribeLinks.push(trimmedLink.substring(1, trimmedLink.length - 1));
}
});
Expand Down Expand Up @@ -356,10 +355,15 @@ class ThreadUnsubscribeStore extends NylasStore {
return this.regexpcompare(regexps, url);
}

// Determine if the unsubscribe email is valid
// Check if the unsubscribe email is known to fail
checkEmailBlacklist(email) {
const regexps = blacklist.emails;
return this.regexpcompare(regexps, email);
if (/\?/.test(email)) {
console.warn('Parsing complicated mailto: URL\'s is not yet' +
' supported by N1-Unsibscribe:' +
`\n${email}`);
}
return this.regexpcompare(regexps, email) || /\?/.test(email);
}

// Takes an array of regular expressions and compares against a target string
Expand Down

0 comments on commit 3a528a1

Please sign in to comment.