Improve seller account filtering
This commit is contained in:
1 parent
d819a0f1e6
commit
f4e8fdc42f
5 files changed
+178
-52
No files matched your search
@@ -254,29 +254,6 @@ export async function runMainLoop(app: AppContainer): Promise<void> {
|
||||
processedAt: Date.now(),
|
||||
});
|
||||
|
||||
// Skip OF/seller accounts before spending on AI.
|
||||
if (
|
||||
config.reddit.filterSellers &&
|
||||
(config.reddit.sellerKeywords.length > 0 || config.reddit.sellerDomains.length > 0)
|
||||
) {
|
||||
const isSeller = await redditApi.isSellerProfile(
|
||||
post.author,
|
||||
config.reddit.sellerKeywords,
|
||||
config.reddit.sellerDomains
|
||||
);
|
||||
if (isSeller) {
|
||||
logger.info(`Skipping u/${post.author} - seller/OnlyFans profile detected`);
|
||||
webServer?.logActivity(
|
||||
'skipped',
|
||||
`Skipped post by u/${post.author} (seller/OnlyFans profile)`,
|
||||
post.author,
|
||||
);
|
||||
webServer?.pushLog('info', `🚫 Skipped u/${post.author} - seller/OnlyFans profile`);
|
||||
postsRepo.setError(post.id, 'Seller profile detected');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh examples weighted toward this post's subreddit.
|
||||
const subredditExamples = responseChecker.getSuccessfulExamples(3, post.subreddit);
|
||||
processorService.setSuccessfulExamples(subredditExamples);
|
||||
|
||||
Reference in new issue
Block a user