Skip to content

fix(whatsapp-bridge): add missing link-preview-js dependency - #82547

Open
withzombies wants to merge 1 commit into
NousResearch:mainfrom
withzombies:fix/whatsapp-bridge-link-preview-dep
Open

fix(whatsapp-bridge): add missing link-preview-js dependency#82547
withzombies wants to merge 1 commit into
NousResearch:mainfrom
withzombies:fix/whatsapp-bridge-link-preview-dep

Conversation

@withzombies

Copy link
Copy Markdown

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Description

Baileys declares link-preview-js as an optional peer dependency and calls it to build outbound link-preview cards. The bridge's package.json doesn't include it, so outbound messages containing URLs silently skip preview generation (Baileys logs a module-not-found and falls back to plain text). Declaring the dependency makes link previews work out of the box.

Changes Made

  • scripts/whatsapp-bridge/package.json: add "link-preview-js": "^3.2.0" (dependencies re-sorted alphabetically).
  • scripts/whatsapp-bridge/package-lock.json: regenerated entries for link-preview-js and its transitive deps (cheerio et al.), lockfileVersion 3.

How to Test

  1. cd scripts/whatsapp-bridge && npm ci — installs cleanly.
  2. Link the bridge to a WhatsApp account and send an outbound message containing a URL: the recipient now sees a link-preview card; before this change the message renders with no preview and the bridge logs Cannot find module 'link-preview-js' at debug level.

Duplicate search

gh search prs --repo NousResearch/hermes-agent "link-preview" → hits are Telegram/Slack/desktop preview PRs (#61022, #42403, #63171, #34302); none touch the WhatsApp bridge dependency. No matching issues found.

Checklist notes

  • Tests: not applicable (JSON manifest change; no JS test harness for the bridge). Manual test steps above.
  • cli-config.yaml.example: N/A (no config keys).

🤖 Generated with Claude Code

Baileys declares link-preview-js as an optional peer dependency and uses
it to build outbound link-preview cards. Without it installed, outbound
messages containing URLs silently skip preview generation. Declare it
explicitly so previews work out of the box.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@withzombies
withzombies requested a review from a team August 9, 2026 14:57
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/whatsapp WhatsApp Business adapter P3 Low — cosmetic, nice to have labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/whatsapp WhatsApp Business adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants