Skip to content

Commit

Permalink
update vouch algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
twilson63 committed May 24, 2024
1 parent 1717700 commit 06cb364
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions server/lib/calc-confidence-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ export function calculate(user) {
const { followers_count, tweet_count, listed_count, like_count } = user.public_metrics;
const verified = user.verified;

const confidenceValue = Math.floor((tweet_count * TWEET_WEIGHT) +
(like_count * LIKE_WEIGHT) +
let confidenceValue = (tweet_count * TWEET_WEIGHT) +
// (like_count * LIKE_WEIGHT) +
// (listed_count * LISTED_WEIGHT) +
(verified ? VERIFIED_WEIGHT : 0));
(verified ? VERIFIED_WEIGHT : 0);
if (!verified) {
if (followers_count < 150) {
confidenceValue = 0
}
if (listed_count < 20) {
confidenceValue = 0
}
if (like_count < 500) {
confidenceValue = 0
}
}

return confidenceValue;
}

0 comments on commit 06cb364

Please sign in to comment.