aboutsummaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/websockets.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/api/websockets.md b/docs/api/websockets.md
index 4e55b8761..7722d731a 100644
--- a/docs/api/websockets.md
+++ b/docs/api/websockets.md
@@ -192,7 +192,7 @@ const server = Bun.serve<{ username: string }>({
close(ws) {
const msg = `${ws.data.username} has left the chat`;
ws.unsubscribe("the-group-chat");
- ws.publish("the-group-chat", msg);
+ server.publish("the-group-chat", msg);
},
},
});