fix: missing platforms in delivery maps + WhatsApp image/bridge improvements#2181
Merged
Conversation
…l schema Matrix, Mattermost, Home Assistant, and DingTalk were missing from the platform_map in both cron/scheduler.py and tools/send_message_tool.py, causing delivery to those platforms to silently fail. Also updates the cronjob tool schema description to list all available delivery targets so the model knows its options.
…s 7.x compat Salvaged from PR #2162 by @Zindar. Reply prefix changes excluded (already on main via #1756 configurable prefix). Bridge improvements (bridge.js): - Download incoming images to ~/.hermes/image_cache/ via downloadMediaMessage so the agent can actually see user-sent photos - Add getMessage callback required for Baileys 7.x E2EE session re-establishment (without it, some messages arrive as null) - Build LID→phone reverse map for allowlist resolution (WhatsApp LID format) - Add placeholder body for media without caption: [image received] - Bind express to 127.0.0.1 instead of 0.0.0.0 for security - Use 127.0.0.1 consistently throughout (more reliable than localhost) Adapter improvements (whatsapp.py): - Detect and reuse already-running bridge (only if status=connected) - Handle local file paths from bridge-cached images in _build_message_event - Don't kill external bridges on disconnect - Use 127.0.0.1 throughout for consistency with bridge binding Fix vs original PR: bridge reuse now checks status=connected, not just HTTP 200. A disconnected bridge gets restarted instead of reused. Co-authored-by: Zindar <zindar@users.noreply.github.com>
3 tasks
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…4a7e401e fix: missing platforms in delivery maps + WhatsApp image/bridge improvements
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…4a7e401e fix: missing platforms in delivery maps + WhatsApp image/bridge improvements
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…4a7e401e fix: missing platforms in delivery maps + WhatsApp image/bridge improvements
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…4a7e401e fix: missing platforms in delivery maps + WhatsApp image/bridge improvements
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…4a7e401e fix: missing platforms in delivery maps + WhatsApp image/bridge improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes in one PR:
1. Missing platforms in cron/send_message delivery maps (follow-up to #2167)
Matrix, Mattermost, Home Assistant, and DingTalk were missing from the
platform_mapin bothcron/scheduler.pyandtools/send_message_tool.py, causing delivery to those platforms to silently fail. Also updates the cronjob tool schema description to list all available delivery targets so the model knows its options.2. WhatsApp image downloading, bridge reuse, Baileys 7.x compat (salvage of #2162)
Salvaged from PR #2162 by @Zindar. Reply prefix changes excluded (already on main via #1756).
Bridge improvements (bridge.js):
~/.hermes/image_cache/viadownloadMediaMessageso the agent can actually see user-sent photosgetMessagecallback required for Baileys 7.x E2EE session re-establishment[image received]Adapter improvements (whatsapp.py):
Fix vs original PR: Bridge reuse now checks
status=connected, not just HTTP 200. A disconnected bridge gets restarted instead of reused.Testing
test_closed_when_bridge_dies_phase2)