We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec902eb commit c81043eCopy full SHA for c81043e
worker/socialPoster.js
@@ -3,6 +3,7 @@ import { TwitterApi } from 'twitter-api-v2'
3
import { msatsToSats, numWithUnits } from '@/lib/format'
4
5
const isProd = process.env.NODE_ENV === 'production'
6
+const WEIGHTED_VOTE_THRESHOLD = 3
7
8
async function postToTwitter ({ message }) {
9
if (!isProd ||
@@ -73,6 +74,7 @@ async function getHottestItem ({ models }) {
73
74
LEFT JOIN "AutoSocialPost" ON "Item"."id" = "AutoSocialPost"."itemId"
75
WHERE "AutoSocialPost"."id" IS NULL
76
AND "Item"."parentId" IS NULL
77
+ AND "Item"."weightedVotes" - "Item"."weightedDownVotes" > ${WEIGHTED_VOTE_THRESHOLD}
78
AND NOT "Item".bio
79
AND "Item"."deletedAt" IS NULL
80
ORDER BY "hot_score_view"."hot_score" DESC
0 commit comments