streamby-core 0.26.8 → 0.26.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,9 @@ function initWsHub(wss, config) {
35
35
  connections.delete(userId);
36
36
  });
37
37
  try {
38
- ws.send(JSON.stringify({ type: 'connected', userId }));
38
+ const payload = JSON.stringify({ type: 'connected', userId });
39
+ console.log(`📤 WS sending to ${userId}:`, payload);
40
+ ws.send(payload, { binary: false });
39
41
  }
40
42
  catch (err) {
41
43
  console.error(`❌ WS send error for user ${userId}:`, err);
@@ -49,6 +51,6 @@ function emitToUser(userId, event) {
49
51
  const payload = JSON.stringify(event);
50
52
  for (const ws of userConnections) {
51
53
  if (ws.readyState === ws_1.WebSocket.OPEN)
52
- ws.send(payload);
54
+ ws.send(payload, { binary: false });
53
55
  }
54
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.26.8",
3
+ "version": "0.26.9",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",