#7118: feat(imessage): add markdown.strip config option
channel: imessage
size: M
Cluster:
WhatsApp Enhancements and Fixes
## Summary
Adds a new `strip` option to the markdown config that allows stripping markdown formatting from outbound messages.
This is useful for channels like iMessage and SMS that don't render markdown - raw asterisks and hashes look ugly to recipients.
## Usage
```yaml
channels:
imessage:
markdown:
strip: true
```
The option can be set at channel level or per-account.
## Changes
- Added `strip?: boolean` to `MarkdownConfig` type
- Added `strip` to `MarkdownConfigSchema` zod schema
- Updated iMessage outbound to apply `stripMarkdown()` when enabled
- Added tests for the new functionality
Since SMS goes through the same iMessage channel (Apple Messages handles both), this also covers SMS.
Closes #3846
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds a `markdown.strip` option to the shared markdown config (types + Zod schema) and wires it into the iMessage outbound adapter so outbound text/captions can have markdown formatting removed when enabled. Includes a new Vitest suite covering default behavior, channel-level enablement, per-account overrides, header stripping, and media caption stripping.
<h3>Confidence Score: 3/5</h3>
- Mostly safe to merge, with one likely runtime edge case in media sending when captions are omitted.
- The change is small and covered by tests, but `sendMedia` applies markdown stripping unconditionally to `text`, which may be optional; if undefined, it can throw at runtime depending on adapter contract.
- src/channels/plugins/outbound/imessage.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#13431: feat(whatsapp): add built-in Markdown to WhatsApp format transform
by asklee-klawd · 2026-02-10
72.9%
#15853: feat: add option to suppress media placeholder text
by MisterGuy420 · 2026-02-14
72.5%
#7353: fix: prevent silent message drops after config.patch restart
by 18-RAJAT · 2026-02-02
71.6%
#15864: feat: add deliverOnlyToolMessages config for clean messaging channe...
by gandalf-the-engineer · 2026-02-14
71.5%
#7395: fix(whatsapp): strip markdown bold/italic from URLs before sending
by lailoo · 2026-02-02
71.4%
#15467: feat(messages): add debounceMedia option for inbound debouncing
by tangcruz · 2026-02-13
69.3%
#12325: fix: trim leading/trailing whitespace from outbound messages
by jordanstern · 2026-02-09
68.3%
#12257: fix(mattermost): default table mode to 'off' for native Markdown re...
by mcaxtr · 2026-02-09
68.0%
#20301: Security: scrub untrusted metadata from user-facing replies
by ashishc2503 · 2026-02-18
67.8%
#14940: fix(googlechat): convert Markdown formatting to Google Chat markup
by brandonwise · 2026-02-12
67.7%