Commit 2cf59c8
committed
fix(telegram): allow URL strings in advanced mode media inputs
The normalizeFileInput helper only handles file objects from the upload UI,
not plain URL strings. When users pass a URL in advanced mode (e.g.,
<Block.result.photo> resolving to 'https://example.com/image.jpg'),
normalizeFileInput tries to JSON.parse it, fails, returns undefined,
and throws 'Photo is required.'
Fix: check if the param is a plain string first (URL or file_id) and
pass it through directly before attempting file normalization.
Applies to: telegram_send_photo, telegram_send_video,
telegram_send_audio, telegram_send_animation.
Fixes #32201 parent 4c12914 commit 2cf59c8
1 file changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
| |||
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
287 | 303 | | |
288 | 304 | | |
289 | 305 | | |
| |||
298 | 314 | | |
299 | 315 | | |
300 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
301 | 325 | | |
302 | 326 | | |
303 | 327 | | |
| |||
312 | 336 | | |
313 | 337 | | |
314 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
315 | 347 | | |
316 | 348 | | |
317 | 349 | | |
| |||
0 commit comments