Skip to content

Commit 51ced95

Browse files
committed
Extract bodyText for text/plain CPIM messages
Phase 2's Messages::IncomingMMS now splits inbound MMS into separate CPIM rows for the file-transfer payload and the inline text caption (text/plain body). The CPIM class declares bodyText but fromString never populated it, so the web UI received the caption row but had nothing to render. Adds bodyText extraction when the inner Content-Type is text/plain. Discovered during sfo prod deploy May 7 2026; validated end-to-end via in-place perl patch on the deployed bundle, then mirrored here for the next CI rebuild.
1 parent 8d17f2a commit 51ced95

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

frontend/lib/CPIM.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ export class CPIM {
4949
cpim.fileURL = data.getAttribute("url");
5050
}
5151

52+
// text/plain bodyText extraction — must match behavior of the equivalent PHP CPIM parser
53+
const innerType = (cpim.getHeader('content-type') || '').toLowerCase();
54+
if (innerType.startsWith('text/plain')) {
55+
cpim.bodyText = parts[2];
56+
}
57+
5258
return cpim;
5359
}
5460

0 commit comments

Comments
 (0)