fix(album): resolve TypeScript strict array access errors

Fix TS2345 errors where array element access (medias[i]) was inferred as
`AlbumMediaItem | undefined` instead of `AlbumMediaItem`.

Changes:
- Add non-null assertion (!) after array access in for loops
- Add explicit cast to AnyMessageContent for hasNonNullishProperty calls

The non-null assertion is safe here because we iterate with `i < medias.length`,
guaranteeing the index is valid.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Renato Alcara
2026-01-23 15:48:09 -03:00
parent 688739239a
commit d95b2236c0
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1529,7 +1529,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
// Send each media item sequentially
for (let i = 0; i < medias.length; i++) {
const media = medias[i]
const media = medias[i]!
const result = await sendMediaWithRetry(media, i)
results.push(result)