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

Function isForwardedEmail

apps/sim/lib/mothership/inbox/format.ts:91–95  ·  view source on GitHub ↗

* Detects whether an email is a forwarded message based on subject/body patterns.

(subject: string | null, body: string | null)

Source from the content-addressed store, hash-verified

89 * Detects whether an email is a forwarded message based on subject/body patterns.
90 */
91function isForwardedEmail(subject: string | null, body: string | null): boolean {
92 if (subject && FORWARDED_PATTERNS.some((p) => p.test(subject))) return true
93 if (body && FORWARDED_PATTERNS.some((p) => p.test(body.substring(0, 500)))) return true
94 return false
95}
96
97/**
98 * Repeatedly applies a regex replacement until the string stabilises.

Callers 1

formatEmailAsMessageFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected