refactor(chat): remove weekly limit flow
This commit is contained in:
@@ -167,10 +167,6 @@ async function sendMessageViaHttp(content: string): Promise<{
|
||||
throw result.error;
|
||||
}
|
||||
void chatRepo.prefetchMediaForSendResponse(result.data);
|
||||
const isMessageLimit =
|
||||
result.data.lockDetail.locked &&
|
||||
result.data.lockDetail.showUpgrade &&
|
||||
result.data.lockDetail.reason === "weekly_limit";
|
||||
const isInsufficientCredits =
|
||||
result.data.canSendMessage === false &&
|
||||
result.data.cannotSendReason === "insufficient_credits" &&
|
||||
@@ -178,9 +174,7 @@ async function sendMessageViaHttp(content: string): Promise<{
|
||||
return {
|
||||
response: result.data,
|
||||
reply:
|
||||
isMessageLimit || isInsufficientCredits
|
||||
? null
|
||||
: sendResponseToUiMessage(result.data),
|
||||
isInsufficientCredits ? null : sendResponseToUiMessage(result.data),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user