Commit a68289d
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 12f7577 commit a68289d
File tree
3 files changed
+15
-3
lines changed- src/api/integrations/channel
- evolution
- meta
- whatsapp
3 files changed
+15
-3
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
601 | 605 | | |
602 | 606 | | |
603 | 607 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | | - | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1291 | 1295 | | |
1292 | 1296 | | |
1293 | 1297 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2979 | 2979 | | |
2980 | 2980 | | |
2981 | 2981 | | |
2982 | | - | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
2983 | 2987 | | |
2984 | 2988 | | |
2985 | 2989 | | |
| |||
0 commit comments