bfe52bb9f8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
import logging
|
|
|
|
from fastapi import Request, Response
|
|
|
|
from app.messengers.base import MessengerService
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class LensaService(MessengerService):
|
|
"""
|
|
Stub implementation for Lensa (IVA Technologies) messenger bot.
|
|
|
|
Lensa's Bot API/SDK is not publicly available.
|
|
This stub provides the MessengerService interface so the integration
|
|
can be implemented when SDK access is obtained from IVA Technologies.
|
|
|
|
To integrate:
|
|
1. Obtain SDK/API documentation from IVA Technologies (iva-tech.ru)
|
|
2. Implement the abstract methods below
|
|
3. Register webhook endpoint in main.py (similar to Telegram)
|
|
"""
|
|
|
|
async def setup(self):
|
|
logger.info("Lensa bot: stub — SDK not available, skipping setup")
|
|
|
|
async def shutdown(self):
|
|
logger.info("Lensa bot: stub — shutting down")
|
|
|
|
async def send_message(self, chat_id: str, text: str, **kwargs):
|
|
logger.warning(f"Lensa bot: send_message not implemented (chat_id={chat_id})")
|
|
|
|
async def send_file(self, chat_id: str, file_path: str, caption: str = ""):
|
|
logger.warning(f"Lensa bot: send_file not implemented (chat_id={chat_id})")
|
|
|
|
async def notify_progress(self, chat_id: str, status: str, progress: int | None = None):
|
|
logger.warning(f"Lensa bot: notify_progress not implemented (chat_id={chat_id})")
|
|
|
|
async def feed_webhook(self, request: Request) -> Response:
|
|
logger.warning("Lensa bot: webhook received but SDK not implemented")
|
|
return Response(status_code=200)
|
|
|
|
|
|
lensa_service = LensaService()
|