this.connections[userId].forEach((userConnection) => {
      if (userConnection && userConnection.client && userConnection.client.readyState === WebSocket.OPEN) {
        userConnection.client.send(formatWebsocketMessage(type, payload));
      }
    });