From 064f8d74de083255086e4739583d48b9b1be19aa Mon Sep 17 00:00:00 2001 From: cypres0099 Date: Tue, 14 Apr 2026 10:35:22 -0500 Subject: [PATCH] fix(gateway/bluebubbles): remove invalid "message" from webhook event registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The BlueBubbles adapter registers its webhook with three events: ["new-message", "updated-message", "message"]. The third, "message", is not a valid event type in the BlueBubbles server API — BB rejects the registration payload with HTTP 400 Bad Request. Currently this is masked by the "crash resilience" check in _register_webhook, which reuses any existing registration matching the webhook URL and short-circuits before reaching the API call. So an already-registered webhook from a prior run keeps working. But any fresh install, or any restart after _unregister_webhook has run during a clean shutdown, fails to re-register and silently stops receiving messages. Observed in production: after a gateway restart in v0.9.0 (which auto- unregisters on shutdown), the next startup hit this 400 and the bot went silent until the invalid event was removed. BlueBubbles documents "new-message" and "updated-message" as the message event types (see https://docs.bluebubbles.app/). There is no "message" event, and no harm in dropping it — the two remaining events cover all inbound message webhooks. Co-Authored-By: Claude Opus 4.6 (1M context) --- gateway/platforms/bluebubbles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/platforms/bluebubbles.py b/gateway/platforms/bluebubbles.py index af71619f4..fc179154f 100644 --- a/gateway/platforms/bluebubbles.py +++ b/gateway/platforms/bluebubbles.py @@ -257,7 +257,7 @@ class BlueBubblesAdapter(BasePlatformAdapter): payload = { "url": webhook_url, - "events": ["new-message", "updated-message", "message"], + "events": ["new-message", "updated-message"], } try: