hermes-agent/gateway/platforms
Osman Mehmood c6ff5e5d30 fix(bluebubbles): auto-register webhook with BlueBubbles server on connect
**Problem:**
The BlueBubbles iMessage gateway was not receiving incoming messages even though:
1. BlueBubbles Server was properly configured and running
2. Hermes gateway started without errors
3. Webhook listener was started on the configured port

The root cause was that the BlueBubbles adapter only started a local webhook
listener but never registered the webhook URL with the BlueBubbles server via
the API. Without registration, the server doesn't know where to send events.

**Fix:**
1. Added _register_webhook() method that POSTs to /api/v1/webhook with the
   listener URL and event types (new-message, updated-message, message)
2. Added _unregister_webhook() method for clean shutdown
3. Both methods handle the case where webhook listens on 0.0.0.0/127.0.0.1
   by using 'localhost' as the external hostname
4. Fixed documentation: 'hermes gateway logs' → 'hermes logs gateway'

**API Reference:**
https://docs.bluebubbles.app/server/developer-guides/rest-api-and-webhooks

**Testing:**
- Webhook registration is now automatic when gateway starts
- Failed registration logs a warning but doesn't prevent startup
- Clean shutdown unregisters the webhook

Closes: iMessage gateway not working issue
2026-04-10 03:21:45 -07:00
..
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py fix(dingtalk,api): validate session webhook URL origin, cap webhook cache, reject header injection 2026-04-10 03:05:04 -07:00
base.py fix: add SOCKS proxy support, DISCORD_PROXY env var, and send_message proxy coverage 2026-04-09 14:19:06 -07:00
bluebubbles.py fix(bluebubbles): auto-register webhook with BlueBubbles server on connect 2026-04-10 03:21:45 -07:00
dingtalk.py fix(dingtalk,api): validate session webhook URL origin, cap webhook cache, reject header injection 2026-04-10 03:05:04 -07:00
discord.py feat(cron): support Discord thread_id in deliver targets 2026-04-10 03:20:05 -07:00
email.py fix(email): close SMTP and IMAP connections on failure (#3804) 2026-03-29 15:38:32 -07:00
feishu.py fix(feishu): add adaptive batch delay for split long messages 2026-04-09 23:25:27 -07:00
homeassistant.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
matrix.py fix(gateway): bypass text batching when delay is 0 (#6996) 2026-04-09 23:59:20 -07:00
mattermost.py fix(security): consolidated security hardening — SSRF, timing attack, tar traversal, credential leakage (#5944) 2026-04-07 17:28:37 -07:00
signal.py fix: Signal duplicate replies with streaming + per-platform tool_progress (#6348) 2026-04-08 17:39:45 -07:00
slack.py fix(slack): add rate-limit retry and TTL cache to thread context fetching 2026-04-09 14:07:32 -07:00
sms.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
telegram.py fix(telegram): adaptive batch delay for split long messages 2026-04-09 23:25:27 -07:00
telegram_network.py feat(gateway): unified proxy support for Discord and Telegram with macOS auto-detection 2026-04-09 14:19:06 -07:00
webhook.py fix: add all platforms to webhook cross-platform delivery 2026-04-10 03:16:24 -07:00
wecom.py fix(gateway): bypass text batching when delay is 0 (#6996) 2026-04-09 23:59:20 -07:00
whatsapp.py refactor: codebase-wide lint cleanup — unused imports, dead code, and inefficient patterns (#5821) 2026-04-07 10:25:31 -07:00