Graceful Degradation
A core principle of msend is that your agent code should never need channel-specific conditionals. Each channel adapter declares its capabilities and degrades unsupported parts in a defined way instead of failing silently.
How Adapters Handle Unsupported Parts
| Part | Slack | ||
|---|---|---|---|
text | Plain + HTML | mrkdwn | Text (link previews off) |
image, file, audio, video | MIME attachment | External file upload | Native Cloud API media |
buttons | Rendered as text | Block Kit buttons | Reply buttons (1–3) or List message (4–10) |
list | Rendered as text | Rendered as text | Native List message (up to 10) |
location | Rendered as text | Rendered as text | Native location message |
reaction | Not supported (unsupported_content) | Emoji reaction (:name: or emoji) | Emoji reaction |
template | Refused (never degraded to plain text) | Refused (never degraded to plain text) | Native Meta template |
Templates never degrade to plain text: A template part is only valid on channels that support templates (WhatsApp). Sending a template part on Email or Slack fails explicitly rather than leaking raw template metadata as text.
Button & List Limits
- On WhatsApp, a
buttonspart with 1 to 3 items becomes native reply buttons; 4 to 10 items becomes a native WhatsApp list message; more than 10 fails with a clear error. - When a user taps a button or list item on Slack or WhatsApp,
msendnormalizes the callback into a standardmessage.receivedevent wheremessage.textis the button title andmessage.metadata.button_idis the button’s ID.
Last updated on