Commit 545e15c
fix: improve type safety by removing 'as any' casts
- Add IMessageRaw interface to properly type prepareMessage() return
- Replace unsafe 'key as any' casts with ExtendedIMessageKey
- Add MessageBodyWithExtendedKey interface for chatwoot service
- Improve code readability with descriptive variable names (pollKey, receivedKey)
Addresses Sourcery code review feedback regarding type safety in remoteJidAlt handling.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent cd800f2 commit 545e15c
File tree
2 files changed
+29
-10
lines changed- src/api/integrations
- channel/whatsapp
- chatbot/chatwoot/services
2 files changed
+29
-10
lines changedLines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| |||
1234 | 1246 | | |
1235 | 1247 | | |
1236 | 1248 | | |
| 1249 | + | |
1237 | 1250 | | |
1238 | 1251 | | |
1239 | 1252 | | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1243 | 1256 | | |
1244 | 1257 | | |
1245 | | - | |
| 1258 | + | |
1246 | 1259 | | |
1247 | 1260 | | |
1248 | 1261 | | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1253 | 1266 | | |
1254 | 1267 | | |
1255 | 1268 | | |
| |||
4649 | 4662 | | |
4650 | 4663 | | |
4651 | 4664 | | |
4652 | | - | |
| 4665 | + | |
4653 | 4666 | | |
4654 | 4667 | | |
4655 | 4668 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
629 | 635 | | |
630 | 636 | | |
631 | 637 | | |
632 | | - | |
| 638 | + | |
633 | 639 | | |
634 | 640 | | |
635 | 641 | | |
| |||
0 commit comments