fix(slack): resolve file metadata via files.info when event payload is partial#3176
fix(slack): resolve file metadata via files.info when event payload is partial#3176waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis change updates Slack webhook file downloading to (1) handle partial file objects by calling Slack The new Key integration point: Blocking issue: removing the Slack hostname allowlist changes the security model — Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Slack as Slack Event API
participant Webhook as formatWebhookInput (Sim)
participant DL as downloadSlackFiles
participant Info as Slack files.info
participant Fetch as secureFetchWithPinnedIP
Slack->>Webhook: event payload (may include partial file objects)
Webhook->>DL: downloadSlackFiles(rawEvent.files, botToken)
alt file.url_private missing
DL->>Info: GET /api/files.info?file={fileId} (Bearer botToken)
Info-->>DL: file { url_private, name, mimetype, size }
end
DL->>Fetch: GET url_private (Bearer botToken)
Fetch-->>DL: file bytes
DL-->>Webhook: [{name, mimeType, size, data(base64)}]
Webhook-->>Slack: 200 OK (processed input)
|
Additional Comments (1)
|
Summary
Type of Change
Testing
Tested manually
Checklist