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

Function hasAttachmentsInBodyStructure

apps/sim/lib/webhooks/polling/imap.ts:468–476  ·  view source on GitHub ↗
(structure: FetchMessageObject['bodyStructure'])

Source from the content-addressed store, hash-verified

466}
467
468function hasAttachmentsInBodyStructure(structure: FetchMessageObject['bodyStructure']): boolean {
469 if (!structure) return false
470 if (structure.disposition === 'attachment') return true
471 if (structure.disposition === 'inline' && structure.dispositionParameters?.filename) return true
472 if (structure.childNodes && Array.isArray(structure.childNodes)) {
473 return structure.childNodes.some((child) => hasAttachmentsInBodyStructure(child))
474 }
475 return false
476}
477
478async function processEmails(
479 emails: Array<{

Callers 1

processEmailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected