From 619406f868bc1904152041dfd7c6a9b4d777f19c Mon Sep 17 00:00:00 2001 From: Yann Flory Date: Wed, 27 Apr 2016 12:17:39 +0200 Subject: [PATCH] Send an ACK when someone asks for the history --- NetfluxWebsocketSrv.js | 1 + 1 file changed, 1 insertion(+) diff --git a/NetfluxWebsocketSrv.js b/NetfluxWebsocketSrv.js index 93aac0d0e..2bc4f3f1d 100644 --- a/NetfluxWebsocketSrv.js +++ b/NetfluxWebsocketSrv.js @@ -103,6 +103,7 @@ const handleMessage = function (ctx, user, msg) { let parsed; try { parsed = JSON.parse(json[2]); } catch (err) { console.error(err); return; } if (parsed[0] === 'GET_HISTORY') { + sendMsg(ctx, user, [seq, 'ACK']); getHistory(ctx, parsed[1], function (msg) { sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify(msg)]); }, function () {