Commit 57b19d8
committed
feat(whatsapp): Convert outgoing images to JPEG before sending
All images sent via the Baileys integration are now pre-processed and converted to JPEG format using the `sharp` library. This ensures better compatibility and prevents potential issues with unsupported formats.
- Images from URLs are now downloaded via axios before processing, which allows for the use of a proxy.
- The default filename and mimetype are updated to `image.jpg` and `image/jpeg` to reflect the conversion.1 parent 33a9229 commit 57b19d8
File tree
1 file changed
+36
-2
lines changed- src/api/integrations/channel/whatsapp
1 file changed
+36
-2
lines changedLines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2448 | 2448 | | |
2449 | 2449 | | |
2450 | 2450 | | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
2451 | 2485 | | |
2452 | 2486 | | |
2453 | | - | |
| 2487 | + | |
2454 | 2488 | | |
2455 | 2489 | | |
2456 | 2490 | | |
| |||
2464 | 2498 | | |
2465 | 2499 | | |
2466 | 2500 | | |
2467 | | - | |
| 2501 | + | |
2468 | 2502 | | |
2469 | 2503 | | |
2470 | 2504 | | |
| |||
0 commit comments