From c6f06992d232cf9e1aa1aeb32690c086f8a8b5e1 Mon Sep 17 00:00:00 2001 From: Florent BENOIT Date: Wed, 22 Feb 2017 11:28:48 +0100 Subject: [PATCH] allow to be notified on web socket raw event (like ping) Change-Id: I Signed-off-by: Florent BENOIT --- dashboard/src/components/api/che-websocket.factory.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dashboard/src/components/api/che-websocket.factory.ts b/dashboard/src/components/api/che-websocket.factory.ts index b8b119d54fd..c1c59aee26d 100644 --- a/dashboard/src/components/api/che-websocket.factory.ts +++ b/dashboard/src/components/api/che-websocket.factory.ts @@ -326,6 +326,10 @@ export class MessageBus { } } + // handle case when we don't have channel but a raw message + if (!channelHeader && headers.length == 1 && headers[0].name === 'x-everrest-websocket-message-type') { + channelHeader = headers[0]; + } if (channelHeader) { // message for a channel, look at current subscribers