MCPcopy Index your code
hub / github.com/simstudioai/sim / processPayloadPart

Function processPayloadPart

apps/sim/tools/gmail/utils.ts:199–214  ·  view source on GitHub ↗
(part: any)

Source from the content-addressed store, hash-verified

197 }> = []
198
199 function processPayloadPart(part: any) {
200 // Check if this part has an attachment
201 if (part.body?.attachmentId && part.filename) {
202 attachments.push({
203 attachmentId: part.body.attachmentId,
204 filename: part.filename,
205 mimeType: part.mimeType || 'application/octet-stream',
206 size: part.body.size || 0,
207 })
208 }
209
210 // Recursively process nested parts
211 if (part.parts && Array.isArray(part.parts)) {
212 part.parts.forEach(processPayloadPart)
213 }
214 }
215
216 // Process the main payload
217 processPayloadPart(payload)

Callers 1

extractAttachmentInfoFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected