Fix AI comment rate limit regression
This commit is contained in:
@@ -1318,6 +1318,11 @@ function checkAIAutoCommentActionAvailability(profileNumber, settings = getAIAut
|
||||
status: currentStatus
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
ok: true,
|
||||
status: currentStatus
|
||||
};
|
||||
});
|
||||
|
||||
return check();
|
||||
@@ -7910,10 +7915,11 @@ app.post('/api/ai/generate-comment', async (req, res) => {
|
||||
return res.status(statusCode).json(payload);
|
||||
};
|
||||
|
||||
let autoCommentRateLimitStatus = null;
|
||||
|
||||
try {
|
||||
const { postText, profileNumber, preferredCredentialId } = requestBody;
|
||||
const normalizedProfileNumber = sanitizeProfileNumber(profileNumber);
|
||||
let autoCommentRateLimitStatus = null;
|
||||
|
||||
if (!postText) {
|
||||
return respondWithTrackedError(400, 'postText is required');
|
||||
|
||||
Reference in New Issue
Block a user