aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-11 16:19:40 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-11 16:19:40 +0200
commitfc509ae281c8cd0aa69870f6123a11e3519fb390 (patch)
tree4835350902707c3535bdf3294f0ed6eeedb1c3a5 /packages/meshbay-hub/src/meshbay_hub/api/revocation.py
parentf74e2c0d527354072a5064d2dac8f73494ec8b49 (diff)
downloadmeshbay-fc509ae281c8cd0aa69870f6123a11e3519fb390.tar.gz
fix(hub): move _handle_chat_notify before @router.websocket decorator
The function was placed between the decorator and node_websocket, breaking the WebSocket endpoint registration (403 on all WS connects). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/revocation.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/api/revocation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
index 00258c1..c9c59c9 100644
--- a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
+++ b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
@@ -98,7 +98,6 @@ def _sign_revocation(target: str, target_id: str, reason: str) -> str:
# ── WebSocket endpoint ────────────────────────────────────────────────────────
-@router.websocket("/v1/nodes/ws")
async def _handle_chat_notify(group_id: str, sender_name: str, sender_user_id: str) -> None:
"""Node informs hub that a chat message was posted — create notifications for offline members."""
if not group_id:
@@ -129,6 +128,7 @@ async def _handle_chat_notify(group_id: str, sender_name: str, sender_user_id: s
log.warning("Chat notify failed: %s", e)
+@router.websocket("/v1/nodes/ws")
async def node_websocket(ws: WebSocket):
"""
Persistent WebSocket connection for nodes.