#19592: feat(whatsapp): add sendAsSticker support
channel: whatsapp-web
agents
size: XS
## Summary
Adds a `sendAsSticker` boolean option to the message tool and WhatsApp outbound pipeline. When set to `true`, images sent via WhatsApp are converted and delivered as stickers instead of regular image messages.
## Motivation
WhatsApp stickers are a widely used messaging format. Currently, there is no way to send an image as a sticker through the message tool — images are always sent as regular image attachments. This PR adds first-class support for sticker delivery, enabling agents and API consumers to send sticker messages by simply setting `sendAsSticker: true`.
## Changes
The implementation threads a `sendAsSticker` boolean through the existing outbound pipeline:
- **Message tool schema** (`message-tool.ts`): Added `sendAsSticker` as an optional boolean parameter
- **WhatsApp outbound adapter** (`whatsapp.ts`): Passes `sendAsSticker` through to the send functions
- **Channel outbound context type** (`types.adapters.ts`): Added `sendAsSticker` to the shared context type
- **Delivery infrastructure** (`deliver.ts`): Threads `sendAsSticker` through handler params, context base, and delivery queue
- **Active listener types** (`active-listener.ts`): Added `sendAsSticker` to `ActiveWebSendOptions`
- **Send API** (`send-api.ts`): When `sendAsSticker` is true and the media is an image, constructs a sticker payload instead of an image payload
- **Outbound sender** (`outbound.ts`): Passes `sendAsSticker` into the send options
## Usage
```json
{
"action": "send",
"target": "<phone or group JID>",
"media": "https://example.com/image.png",
"sendAsSticker": true
}
```
The image will be sent as a WhatsApp sticker. When `sendAsSticker` is not set or `false`, behavior is unchanged — images are sent normally.
## Scope
- 7 files changed, ~21 lines added
- No breaking changes — the new parameter is optional and defaults to `false`/`undefined`
- Only affects WhatsApp channel; other channels ignore the parameter
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added `sendAsSticker` boolean option to enable sending images as WhatsApp stickers through the message tool and outbound pipeline. The implementation correctly threads the parameter through all layers (message tool schema, channel adapters, delivery infrastructure, and send API). When enabled, images are sent as sticker payloads instead of image messages with captions.
- Threads `sendAsSticker` through 7 files across the outbound pipeline
- Only affects WhatsApp channel; other channels ignore the parameter
- No breaking changes - optional parameter defaults to false/undefined
- Implementation is clean and follows existing patterns (similar to `gifPlayback`)
- Note: WhatsApp stickers don't support captions, so any text passed with `sendAsSticker: true` will be ignored
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The implementation is straightforward, non-breaking, and follows established patterns. The `sendAsSticker` parameter is optional, properly threaded through all layers, and only affects WhatsApp. The code is clean with no logical errors or security concerns. The only minor consideration is the implicit behavior that text/captions are ignored for stickers, which is standard WhatsApp behavior.
- No files require special attention
<sub>Last reviewed commit: d8a5b30</sub>
<!-- greptile_other_comments_section -->
<sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#7502: feat(whatsapp): send WebP files as stickers
by giannisanni · 2026-02-02
87.9%
#19056: feat(inbound-meta): expose sticker metadata in system prompt
by xuandung38 · 2026-02-17
79.1%
#13278: feat(telegram): full sticker support — thumbnail fallback, set inde...
by thebtf · 2026-02-10
76.3%
#21881: fix(whatsapp): pass user-provided fileName through document send pipe…
by saakshigupta2002 · 2026-02-20
75.3%
#8705: feat(whatsapp): add viewOnce support for ephemeral media
by ndohuu · 2026-02-04
74.8%
#16785: fix(whatsapp): preserve document filenames in outbound Baileys mode
by SahilSahu731 · 2026-02-15
73.1%
#9606: fix: pass fileName to WhatsApp document messages
by AytuncYildizli · 2026-02-05
73.0%
#13431: feat(whatsapp): add built-in Markdown to WhatsApp format transform
by asklee-klawd · 2026-02-10
72.9%
#23579: feat(whatsapp): add sender attribution to inbound message logs
by svan058 · 2026-02-22
72.9%
#7458: fix: pass filename through to WhatsApp document sends (#7446)
by gavinbmoore · 2026-02-02
72.5%