feat: Enhance database connection robustness, update onboarding command to /welcome, and remove /socia_finder functionality.

This commit is contained in:
Marco Gallegos
2025-12-14 11:53:45 -06:00
parent b0d30928f1
commit 220b78886d
5 changed files with 58 additions and 50 deletions

View File

@@ -64,8 +64,8 @@ async def recibir_archivo(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
msg.attach(attachment)
# 3. Enviar el correo
context = ssl.create_default_context()
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT, context=context) as server:
ssl_context = ssl.create_default_context()
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT, context=ssl_context) as server:
server.login(SMTP_USER, SMTP_PASSWORD)
server.sendmail(SMTP_USER, SMTP_RECIPIENT, msg.as_string())
@@ -86,4 +86,4 @@ print_handler = ConversationHandler(
entry_points=[CommandHandler("print", start_print)],
states={ESPERANDO_ARCHIVO: [MessageHandler(filters.Document.ALL | filters.PHOTO, recibir_archivo)]},
fallbacks=[CommandHandler("cancelar", cancelar)]
)
)