Commit ac9fd35
fix: normalize fileName property to handle case-insensitivity
The sendMedia endpoint had an inconsistency where:
- For images: only `filename` (lowercase) worked
- For documents/videos: only `fileName` (camelCase) worked
This was caused by the code only checking `data.fileName` without
considering that users might send `filename` (lowercase) in the
JSON payload.
This fix normalizes the property name at the beginning of the
mediaMessage method in all three channel services:
- whatsapp.baileys.service.ts
- evolution.channel.service.ts
- whatsapp.business.service.ts
Now both `fileName` and `filename` are accepted for all media types.
Closes #2459
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 5624bda commit ac9fd35
3 files changed
Lines changed: 15 additions & 3 deletions
File tree
- src/api/integrations/channel
- evolution
- meta
- whatsapp
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
611 | 615 | | |
612 | 616 | | |
613 | 617 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1288 | 1292 | | |
1289 | 1293 | | |
1290 | 1294 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3265 | 3265 | | |
3266 | 3266 | | |
3267 | 3267 | | |
3268 | | - | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
3269 | 3273 | | |
3270 | 3274 | | |
3271 | 3275 | | |
| |||
0 commit comments