From dcc3b6cd21bd41479cf27a3ee4e85c4903b5e869 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 31 Aug 2016 17:58:57 +0200 Subject: [PATCH] Send a more precise message when the history is synced --- NetfluxWebsocketSrv.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NetfluxWebsocketSrv.js b/NetfluxWebsocketSrv.js index d92510749..8f557d6eb 100644 --- a/NetfluxWebsocketSrv.js +++ b/NetfluxWebsocketSrv.js @@ -157,7 +157,8 @@ const handleMessage = function (ctx, user, msg) { getHistory(ctx, parsed[1], function (msg) { sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify(msg)]); }, function () { - sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, 0]); + let parsedMsg = {state: 1, channel: parsed[1]}; + sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify(parsedMsg)]); }); } return;