The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -3292,7 +3292,7 @@ let otpResponse, otpData; - if (session.serviceType === 'RETRIEVE_SMS' || session.serviceType === 'DOWNLOAD_PDF') { + if (session.serviceType === 'RETRIEVE_SMS' || (session.serviceType === 'DOWNLOAD_PDF' && !session.pdfPhase)) { const reqBody = { mobile: session.mobile, name: session.name, @@ -3309,7 +3309,7 @@ }); otpData = await otpResponse.json(); console.timeEnd(tLabel('Backend Request')); - } else if (session.serviceType === 'EID_TO_PDF') { + } else if (session.serviceType === 'EID_TO_PDF' || session.pdfPhase) { const otpReqBody = { eid: session.eidNumber, captchaValue: session.captchaValue, [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.