Skip to content

docs: add complete examples for status broadcast (text, image, video, audio, reshare)#2634

Open
khoirulyahya wants to merge 2 commits into
WhiskeySockets:masterfrom
khoirulyahya:docs/status-broadcast-complete-examples
Open

docs: add complete examples for status broadcast (text, image, video, audio, reshare)#2634
khoirulyahya wants to merge 2 commits into
WhiskeySockets:masterfrom
khoirulyahya:docs/status-broadcast-complete-examples

Conversation

@khoirulyahya

@khoirulyahya khoirulyahya commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Expands the "Broadcast Lists & Stories" section in the README with complete, verified working examples for all supported status types.

Closes #2633


What's changed

The existing section only showed one image example and mentioned (without code) that voice/video were supported. This PR adds:

✅ Text status example

With backgroundColor and font options documented.

✅ Image status with caption

Using status@broadcast explicitly as JID (was using generic jid before).

✅ Video status with caption + reshare

Documents contextInfo.featureEligibilities.canBeReshared: true — a field defined in WAProto/WAProto.proto (ContextInfo.FeatureEligibilities, field 4) that enables the reshare button for recipients. This was completely undocumented and is not mentioned anywhere in the README or baileys.wiki.

✅ Audio/voice status — critical mobile visibility fix

Documents that both ptt: true AND backgroundColor are required in the options for audio status to be visible on mobile devices. Without these, the status appears on WhatsApp Web but is silently invisible on Android/iOS. The root cause is referenced in src/Utils/messages.js ("computed backgroundColor audio status" comment).

✅ Audio reshare limitation + workaround

Documents that audio statuses cannot be reshared (WA platform restriction), with an ffmpeg workaround to wrap audio in a black-background video for reshare support.


Verification

All behaviors verified by sending real status updates (Baileys v7.0.0-rc.9) and confirming receipt/visibility on physical Android devices. The canBeReshared field was discovered by reading WAProto/WAProto.proto directly.


Summary by cubic

Adds complete, working examples for sending status updates (text, image, video, audio) via sendMessage to status@broadcast, with clear options and reshare behavior that work on web and mobile. Clarifies statusJidList rules and standardizes media examples. Closes #2633.

  • Highlights
    • Stories: use status@broadcast with statusJidList; broadcast lists use their own JID (e.g. 1234@broadcast) and don’t require statusJidList.
    • Text: supports backgroundColor and font.
    • Video: enable reshare via contextInfo.featureEligibilities.canBeReshared; requires “Allow Resharing” enabled in sender’s privacy settings.
    • Audio: must include ptt: true and backgroundColor for mobile visibility; example uses { url } with a Buffer alternative noted.
    • Audio cannot be reshared; workaround provided using ffmpeg to wrap audio in a video.

Written for commit 651e087. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation
    • Rewrote broadcast & stories messaging docs with dedicated sendMessage examples for text, image (caption), video (reshare flag), and audio/voice statuses; clarifies story recipient requirements, audio visibility requirements, that audio statuses cannot be reshared, and includes guidance for converting audio to video for resharing.

… audio, reshare)

- Add separate examples for text, image, video, and audio status
- Document that audio status requires ptt:true + backgroundColor in options
  to be visible on mobile (without it, only shows on WA Web)
- Document canBeReshared: true via contextInfo.featureEligibilities for enabling
  reshare button (field discovered in WAProto/WAProto.proto ContextInfo message)
- Note that audio statuses cannot be reshared (WA platform restriction)
  with workaround: wrap audio in video with black background via ffmpeg
- Use 'status@broadcast' explicitly in examples instead of generic 'jid'

Closes WhiskeySockets#2633
@whiskeysockets-bot

whiskeysockets-bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@khoirulyahya/Baileys#docs/status-broadcast-complete-examples

# Yarn (v2+)
yarn add @whiskeysockets/baileys@khoirulyahya/Baileys#docs/status-broadcast-complete-examples

# PNPM
pnpm add @whiskeysockets/baileys@khoirulyahya/Baileys#docs/status-broadcast-complete-examples

If you encounter any issues or have feedback, feel free to comment as well.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8d37ba5f-51ce-4152-bd63-41a59ab1dbd3

📥 Commits

Reviewing files that changed from the base of the PR and between 1b8f70d and 651e087.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

The Broadcast Lists & Stories documentation section is expanded from a single image example to comprehensive examples covering text, image, video, and audio statuses. Audio status prerequisites (ptt: true and backgroundColor) for mobile visibility, reshare enablement via contextInfo.featureEligibilities.canBeReshared, platform limitations for audio resharing, and an ffmpeg workaround for video-wrapped audio are now documented.

Changes

Broadcast Lists & Stories Documentation

Layer / File(s) Summary
Intro and text status example
README.md
Adds intro clarifying status@broadcast + statusJidList for stories vs. broadcast list JID, and a text sendMessage example with optional backgroundColor/font and broadcast: true.
Image status example
README.md
Adds image status example sending an image payload with caption, delivered via statusJidList and broadcast: true.
Video status with reshare flag
README.md
Adds video status example enabling reshare by setting contextInfo.featureEligibilities.canBeReshared in the payload.
Audio/voice status and ffmpeg workaround
README.md
Documents audio status requirements (ptt: true and backgroundColor) for mobile visibility, states audio statuses cannot be reshared, and provides an ffmpeg command to wrap audio into a black-background video for reshare via video status.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

📡 A rabbit hops through status flows,
Now texts and pics and videos show—
With audio notes (add ptt with care!),
And reshare buttons, bright and fair.
Dark backgrounds make the voices sing, 🐰✨
While ffmpeg wraps each audio thing!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding complete documentation examples for all status broadcast types (text, image, video, audio, and reshare functionality).
Linked Issues check ✅ Passed The PR implementation comprehensively addresses all coding objectives from issue #2633: text status with backgroundColor, image status with caption, video status with canBeReshared flag for reshare enabling, and audio/voice status with required ptt and backgroundColor for mobile visibility, plus ffmpeg workaround documentation.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the linked issue #2633 objectives—documentation additions for status broadcast examples with verified platform-specific behaviors and workarounds. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 1249: The README example uses fs.readFileSync('./audio.ogg') but doesn't
import fs; update the example so it is consistent with other examples by either
adding an explicit import (e.g., add an import statement for fs) or by changing
the audio payload to the URL-style format used by images/videos (e.g., use {
url: './audio.ogg' }) so the referenced symbol fs.readFileSync is no longer
undefined.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d5d1b5db-48a1-47f9-95af-4cf5ce099e32

📥 Commits

Reviewing files that changed from the base of the PR and between 78e7e4e and 1b8f70d.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread README.md Outdated
Comment thread README.md Outdated
- Replace fs.readFileSync with { url } syntax for consistency with
  image/video examples; add inline comment showing Buffer alternative
- Clarify that statusJidList is required for stories (status@broadcast)
  but not for broadcast lists which use their own JID format

Addresses bot review feedback on PR WhiskeySockets#2634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[DOCS] Broadcast & Stories — Missing examples for audio, video, caption, and reshare (canBeReshared)

2 participants