TONstories opened a new pull request, #77383:
URL: https://github.com/apache/airflow/pull/77383
A DAG that passes `telegram_kwargs={"link_preview_options":
LinkPreviewOptions(prefer_large_media=True)}` to TelegramOperator fails before
the bot sends the message. The hook adds `disable_web_page_preview=True` even
though the caller selected the newer options, and python-telegram-bot rejects
the combination.
Apply the hook's existing default only when the caller supplies no link
preview options. Callers using the legacy setting can still override the
default. Explicitly passing conflicting options continues to be validated by
the client.
The regression runs TelegramHook through the installed Telegram client's
parameter validation with delivery mocked. On main it raised `ValueError:
Parameters disable_web_page_preview and link_preview_options are mutually
exclusive`. Afterward, the selected options reach the send call.
Local verification: all 28 Telegram provider unit tests passed. Ruff lint
and formatting checks passed on the provider source and tests.
- [x] Yes, generative AI assisted with this contribution.
Generated-by: OpenAI Codex following [the Airflow
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]