← Back to PRs

#15095: fix(slack): process all file attachments instead of only the first

by Lar000ki open 2026-02-13 01:05 View on GitHub →
channel: slack stale size: S
## Summary - `resolveSlackMedia()` now returns all successfully fetched files instead of returning after the first one - Added `buildSlackMediaPayload()` helper following the existing Discord pattern, populating both singular and plural media fields - Updated tests for new array return type + added multi-file test Fixes #15190 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates Slack inbound media handling so `resolveSlackMedia()` returns *all* successfully fetched attachments rather than stopping after the first. `prepareSlackMessage()` is updated to consume the new array return type and to populate both singular (`MediaPath`/`MediaUrl`/`MediaType`) and plural (`MediaPaths`/`MediaUrls`/`MediaTypes`) context fields via a new `buildSlackMediaPayload()` helper, matching the pattern used by other providers. Tests were updated to assert the new empty-array behavior and to cover multi-file handling. <h3>Confidence Score: 5/5</h3> - This PR appears safe to merge with minimal risk. - Changes are localized to Slack inbound media resolution and message preparation, with tests updated/expanded to cover the new multi-file behavior and the return-type change. Downstream context fields already support plural media arrays and similar providers use the same local-path-as-URL pattern. - No files require special attention <sub>Last reviewed commit: 53fe2f4</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs